WARSAW, Poland (AP) — The majority of voters in Poland’s general election supported opposition parties that promised to reverse democratic backsliding and repair the nation’s relationship with allies, including the European Union and Ukraine, near-complete results showed Monday.

The result was a disappointment for the Law and Justice party and its leader Jarosław Kaczyński, who have governed Poland for eight years with a conservative, nationalist and sometimes anti-EU agenda.

Though it remains Poland’s biggest party, Law and Justice lost its majority in parliament, putting a centrist opposition led by former EU president Donald Tusk in a strong position to take over power, official results indicated, with over 99% of districts counted.

It was among the most important elections in an EU country this year, and the results have been anxiously awaited in Brussels, Berlin and other capitals by observers hoping that a step-by-step dismantling of checks and balances could be halted before a turn toward authoritarianism that would be hard to reverse.

“I am really overjoyed now,” Magdalena Chmieluk, a 43-year-old accountant, said Monday. She predicted that the opposition “will form a government and we will finally be able to live in a normal country, for real.”

After a bitter and emotional campaign, turnout was projected at over 74%, the highest level in the country’s 34 years of democracy and surpassing the 63% who turned out in the historic 1989 vote that toppled communism. In the city of Wroclaw, the lines were so long that voting continued through the night until nearly 3 a.m. Young voters particularly came out in force to flood polling stations.

The official ballot count, which matched the results of an exit poll released Sunday night, suggested voters had grown tired of the ruling party after eight years of divisive policies that led to frequent street protests, bitter divisions within families and billions in funding held up by the EU over rule of law violations.

Another term for Law and Justice would have been seen as a bad omen in Brussels, which has to contend with Hungary, where democratic erosion has gone much further under Prime Minister Viktor Orbán. New concerns arose after the leftist pro-Russia and Orbán ally Robert Fico won an election in Slovakia.

The outcome could also affect ties with neighboring Ukraine, which Poland has supported in the war against Russia’s full-scale invasion. Good relations soured in September over Ukrainian grain entering and affecting Poland’s market.

As the vote count neared the end, Law and Justice had nearly 36% and the far-right Confederation, a possible ally, 7%. Three opposition parties led by Tusk’s Civil Coalition together had more than 53%, enough for a comfortable majority in the 460-seat lower house of parliament, or Sejm.

On Sunday evening, Tusk declared the end of Law and Justice rule and a new era for Poland. However, Poles were possibly facing weeks of political uncertainty as Law and Justice said it would still try to build a new government led by Prime Minister Mateusz Morawiecki.

President Andrzej Duda, an ally of Law and Justice, must call the first session of the new parliament within 30 days of the election and designate a prime minister to try to build a government. In the meantime, the current government will remain in a caretaker role.

Duda, during a visit to Rome on Monday, declined comment pending final results, telling reporters that he was happy about the large turnout and the peaceful nature of the election at a time of war across the border in Ukraine and “hybrid attacks from Belarus.”

A limited international observation mission led by the Organization for Security and Cooperation in Europe and the Council of Europe said the “historic high turnout demonstrated the commitment of citizens to upholding democracy in Poland.” But it also pointed to the problem of bias by taxpayer-funded public television, which it said ”demonstrated open hostility towards the opposition.”

Douglas Wake, the head of the mission, called it troubling that “the ruling party and its candidates gained a clear advantage from the misuse of state resources, undermining the separation between state and party.”

The governing party also mobilized other state resources to help itself, including an unfair division of votes in electoral districts, said Jacek Kucharczyk, president of the Institute of Public Affairs, a Warsaw think tank.

“The electoral system was really tilted toward the government,” Kucharczyk said. “You could say that the opposition had to fight this election with one hand tied behind its back and they still won.”

Supporters of the ruling party were downbeat about the result.

“I am disappointed with the results, but I accept the democratic choice,” said Elżbieta Szadura-Urbańska, a 58-year-old psychologist who voted for Law and Justice. “I think my party is also democratic.”

Others were concerned about possible obstacles to a smooth transfer of power.

Cezary Tomczyk, vice chairman of Tusk’s party, urged the ruling party to accept the election result, saying it was the will of the people to give power to the opposition.

“The nation has spoken,” Tomczyk said.

Even if the opposition parties take power, they will face difficulties in putting forward their agenda. The president has veto power over laws, while the constitutional court, whose role is to ensure that legislation doesn’t violate the basic law, is loyal to the current governing party, Kucharczyk said.

“Fixing the relations with the EU in particular will require domestic changes, namely restoring the independence of the judiciary, restoring the rule of law, which is a condition for the EU to release the funding for Poland,” Kucharczyk said. “It will be a very, very prolonged and difficult process.”


Associated Press journalists Pietro De Cristofaro, Kwiyeon Ha and Rafal Niedzielski in Warsaw and Raf Casert in Brussels contributed to this report.