Hungarian Prime Minister Viktor Orban faced his biggest defeat in a decade as an opposition candidate won a mayoral election in the Hungarian capital, Budapest.

Gergely Karácsony, an independent candidate backed by the liberal and centre-left opposition parties, beat the incumbent Fidesz mayor Istvan Tarlos with 50.9 percent of the vote.

“Budapest will be green and free, we will bring it back to Europe,” Karácsony proclaimed in his victory speech.

Karácsony compared the result in Budapest to that of Istanbul, where an opposition victory gave Turkish President Ergodan a bloody nose.

Orban faced further humiliation elsewhere in the country, as ten major cities outside of Budapest also backed opposition candidates, including Miskolc, Eger and Pecs.

Despite this, Fidesz did still win in many cities, with one mayor re-elected in Gyor despite a sex scandal being exposed just days before the polls opened.

The victories for the opposition came despite state control over broadcast media in the country, with many television stations and newspapers parroting the views of the Orban administration.

It has been seen as a test of strategic cooperation, which could offer a route towards ousting Orban in the next general election in 2022.