File photo: Britta Pedersen.

Sao Paulo, Brasil - A judge on Wednesday barred Uber from operating in the Sao Paulo, siding with the city's taxi drivers who complained that the popular ride-sharing service enjoys an unfair competitive advantage.

Judge Roberto Corcioli Filho, citing “irregular activity” by Uber, ordered the company to shut down its Sao Paulo operations.

The decision comes just a few weeks after Brazil saw anti-Uber protests by taxi drivers in various cities across the country.

The court did not rule out an appeal from Uber, which has seen a massive pushback from the livery industry in almost every city where it has set up operations.

Uber said in a statement after the court ruling that Brazilians “have a fundamental right to choose” their means of transport, and saying it provides citizens of Sao Paulo a “safe and comfortable option.”

Uber has drawn criticism in many countries from regulators and established taxi operators, which accuse it of flouting competition rules and of not carrying out sufficient safety checks on drivers and their vehicles.

The company has been hit with court injunctions in Belgium, France, the Netherlands and Spain, and has faced protests from taxi firms in numerous other major cities, including London and Brussels.

About one million Uber rides are taken each in 55 countries.