Centrist and progressive forces appeared capable of forming a new government in Poland after securing more seats in a critical general election on Sunday, despite the governing nationalist party, Law and Justice, winning the most votes for a single party.
Exit polls showing a strong second place finish by the main opposition group, Civic Coalition, and better than expected results for two smaller centrist and progressive parties suggested a dramatic upset that would frustrate the governing party’s hope of an unprecedented third consecutive term.
A jubilant Donald Tusk, Civic Coalition’s leader, declared the projected results a resounding “win for democracy” that would end the tenure of Law and Justice, known by its Polish acronym PiS, in power since 2015.
“We did it! We really did!” Mr. Tusk, a former prime minister, told supporters Sunday night. “This is the end of this bad time! This is the end of PiS rule!”
The election for a new Parliament, held after a vicious campaign in the highly polarized nation, was closely watched abroad, including in Russia and Ukraine, and viewed by many Poles as the most consequential vote since they rejected communism in the country’s first partly free election in 1989. Reflecting the high stakes, nearly 73 percent of the electorate voted, the highest turnout in a Polish election since the end of communist rule.
Both the governing Law and Justice and Civic Coalition cast the election as an existential moment of decision on Poland’s future as a stable democratic state.
If early forecasts turn out to be correct when final official results are announced, probably on Tuesday, Civic Coalition and its potential partners won 248 seats in the 460-member legislature, compared with 200 won by Law and Justice.
Jaroslaw Kaczynski, the governing party’s chairman and Poland’s de facto leader for the last eight years, also claimed victory, declaring the vote “a great success for our formation, our project for Poland.” But he acknowledged that his party would have trouble forming a government if the exit polls are correct.
Konfederacja, a radical right-wing grouping that shares many of the nationalist views of Law and Justice, won only 6.2 percent of the vote, giving it 12 seats. Exit polls are generally reliable in Poland but some experts cautioned that the unusually high turnout could make them less accurate. Because of long queues at polling stations voting continued late into the night in some places.
Exit polls released by Poland’s three main television channels indicated that Law and Justice had won the most votes overall — 36.8 percent — compared with 31.6 percent for Civic Coalition. Two smaller parties, Third Way, an alliance of centrists, and The Left reached the necessary threshold to enter the more powerful lower house of Parliament, the Sejm.
Seats in the Sejm are apportioned under a complicated proportional system that makes it difficult to determine with precision the future balance of power until all of the votes have been counted and those of smaller parties that failed to reach the threshold (5 percent for parties and 8 percent for coalitions) are redistributed among the top finishers.
Przemyslaw Adynowski, a Warsaw lawyer, said he had voted for Civic Coalition in what he described as “probably the most important election in 30 years.” A victory for Law and Justice, he added, would complete Poland’s “phase of transition from democracy to an authoritarian system” and put it at odds with its allies in NATO and the European Union, except for Hungary, a much smaller nation with little clout.
Piotr Buras, the head of the Warsaw office of the European Council on Foreign Relations, declared the election “a triumph of both democracy and liberalism” that “opens the way for a massive reorientation of Poland’s domestic and European policy.”
The result was particularly striking given that Law and Justice enjoyed a big advantage thanks to its tight control of Poland’s public broadcasting system, a nationwide network of television and radio stations that is supposed to be neutral but mostly served as a propaganda bullhorn for the incumbent party.
The playing field was further tilted in the governing party’s favor by the holding of a referendum alongside the parliamentary election. Voters were asked to answer four loaded questions about immigration and other issues that were clearly intended to cast the European Union, and by association the opposition, in a bad light.
One asked: “Do you support the admission of thousands of illegal immigrants from the Middle East and Africa, in accordance with the forced relocation mechanism imposed by European bureaucracy?”
The referendum short-circuited campaign finance restrictions, allowing Law and Justice to deploy state funds to promote supposedly neutral information about questions heavily slanted in its favor. Many voters, however, declined to answer referendum questions, viewing the exercise as a stunt by the governing party.
Law and Justice hoped that the referendum would help revive an anti-migrant message that has for years been its electoral strong suit, but one that lost its edge in the final weeks of the campaign when some of its officials became embroiled in a visas-for-cash scandal. Evidence that a large number of Polish work visas, valid across the European Union, had been sold to African and Asian migrants led to the abrupt resignation of a deputy foreign minister and his removal from a list of candidates put forward by Law and Justice.
Mr. Kaczysnki, the party’s chairman, warned that a vote for his opponents, led by Mr. Tusk, a former president of the European Council, the European Union’s main power center, would mean subordinating Poland’s national interests to those of Berlin and Brussels and the end of Poland as an independent democratic country.
“They intend to eliminate democracy and any traces of the rule of law in Poland,” Mr. Kaczysnki said this month at a party convention.
Mr. Tusk’s camp, for its part, presented Mr. Kaczynski as a mortal threat to liberal democracy and to Poland’s continued membership of the European Union, with which the departing Law and Justice government clashed repeatedly over the rule of law, the protection of minority rights and other issues.
The election campaign was so vituperative and unsettling that many Poles, particularly opposition supporters, could not wait for it to be over.
“It was awful, so brutal,” said Ewa Zabowska, a retired Health Ministry official, after casting her vote for the opposition at a Warsaw primary school. “It went on for too long. Nonstop lies for months.”
What Ms. Zabowska viewed as lies, however, fans of Law and Justice accepted as alarming truths. “Tusk is an emissary of Germany — he will do exactly what Germany dictates,” Antoni Zdziaborski, a retired Warsaw tram driver, said after voting for the governing party.
Anatol Magdziarz contributed reporting from Warsaw.