BUDAPEST, Hungary (AP) — Three candidates aiming to unseat Hungary's right-wing Prime Minister Viktor Orban in elections next spring have cleared the first round of a countrywide opposition primary contest that was the first in the Central European nation's history.

The poll, which closed late Tuesday, gave Hungarians a chance to choose between five opposition candidates vying to challenge Orban in national elections slated for April. The top three candidates will go on to a second round of voting scheduled to begin next week.

Klara Dobrev, the candidate for the liberal Democratic Coalition party and a vice-president of the European Parliament, won the most votes, with 34%, followed by the center-left mayor of Budapest Gergely Karacsony, supported by the Hungarian Socialist Party and two smaller green parties, with 27%.

In third place was Peter Marki-Zay, an independent conservative and mayor of a small city in southern Hungary, with 20%.

If elected in the spring, Dobrev, a 49-year-old lawyer and economist who favors closer integration with the European Union, would be the first female prime minster in Hungary's history. She has promised to dismantle Orban's political system and challenge Hungary's 2012 constitution authored and unilaterally passed by his party.

“We won't stop until we've defeated Viktor Orban's system,” Dobrev said at an event celebrating her victory late Thursday. “We will not stop until next April, when we will finally be able to say that we live in a European, democratic, Hungarian republic.”

Nearly 634,000 votes were cast in the week-long contest, around 8% of Hungary’s voting-age population. Observers noted that the turnout was similar to the 2020 Democratic primary in the United States.

The five candidates held two televised debates ahead of the primary, a novel sight in Hungary where Orban has refused to debate with challengers since 2006.

In an online statement Thursday, Karácsony, the mayor of Budapest, said that “a great victory was achieved” through the primary contest.

“Democracy has won, the cause for change has won, and our belief that there is room for fair debate and clean competition in politics has won,” he said.

Beside the election of a candidate for prime minister, candidates for parliamentary seats were also chosen in each of Hungary's 106 individual electoral districts.

Candidates from Dobrev's party took the most districts with 32, followed by the formerly far-right Jobbik party with 29.

The contest was part of a hard-won strategy by Hungary's six main opposition parties to put aside ideological differences and coordinate their candidates after more than a decade of bitter losses to Orban’s Fidesz party, which holds a two-thirds majority in parliament.

Their coalition, which includes green, liberal and right-wing parties, will field a single prime ministerial candidate to face Orban, and single joint candidates against the Fidesz contender in each electoral district — the only method, they say, to overcome an electoral system authored by Orban's party that gives it an unfair advantage.

That method led to significant gains during municipal elections in 2019, when the coalition flipped the leadership of Budapest and most of Hungary’s larger cities.

Copyright 2021 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.