Real Brazilian police. Edit
In addition to Civil Police, Brazil has a Military Police. Given how UFE is officially called the 55th Special Forces Batallion, it would seem this Unit is part of the Military Police of Sao Paolo.
No doubt UFE was partly inspired by BOPE and other units but I think the creators got the initial idea from the corrupt SWAT team Aesir used in the movie.