Leader of Poland's victorious Law And Justice (PiS) Jaroslaw Kaczynski casts his ballot on Sunday in Warsaw. | WOJTEK RADWANSKI/AFP/Getty Polish right sweeps parliamentary elections Law and Justice returns to power after eight years of center-right rule.

WARSAW — A right-wing wave on Sunday swept out Poland’s ruling Civic Platform party after eight years in office, according to exit polls released immediately after voting ended at 9 pm.

The polls showed Law and Justice (PiS) with 37.7 percent and Civic Platform with 23.6 percent.

Coming after the party's candidate won Poland's presidency in May, this victory gives PiS a firm hold on all the reins of power in the EU's sixth most-populous country. The turnover here brings into office another vocally nationalistic government in Central Europe from the same political family as Hungary's Viktor Orbán.

The outcome was an expected but nonetheless stunning rebuke of Civic Platform, a party co-founded by Donald Tusk, now the president of the European Council, which four years ago took 39 percent of the vote. Thought the right-center party presided over eight years of growth, it lost steam in its last year in office, tainted by scandals and out of new ideas.

The dissatisfaction with establishment politicians brought new rebel parties into the Polish parliament, or Sejm.

The Kukiz’15 party, a movement founded by rocker Paweł Kukiz, took 8.7 percent. Nowoczesna, which was founded by economist Ryszard Petru to appeal to reformers who once backed Tusk and Civic Platform, took 7.7 percent.

Also in parliament will be the Polish People's Party with 5.2 percent.

A coalition of left-wing parties failed to make it past the 8 percent threshold to get seats in parliament, marking the first time that the communists or their successors have been out of parliament since they took power with the help of the Red Army in 1944.

Voter turnout was 51.6 percent voter turnout.

The official results will be released on Tuesday. In previous elections, Polish exit polls have not always been accurate. There is a chance that some of the smaller parties balancing on the edge of the 5 percent threshold needed to enter parliament, could still squeeze in.

Women to swap PM jobs

The preliminary results imply that PiS will get 232 seats in the 460-member parliament, enough for an absolute majority. “This is the first time in 25 years that something like this has happened,” said Norbert Maliszewski, a political scientist at the University of Warsaw.

“Mr. President, reporting mission accomplished,” said Jaroslaw Kaczyński as his dead twin brother Lech's daughter, Marta, stood by his side.

Ewa Kopacz, who was chosen by Tusk to replace him when he went to Brussels last year, is out as prime minister and is unlikely to hold on to her leadership of Civic Platform. “Poland is decidedly more beautiful than it was eight years ago,” Kopacz said in a short speech immediately after the voting ended. If these results stand, Civic Platform will have 137 seats in the Sejm.

She is likely to be replaced as prime minister by Beata Szydło, 52, the deputy leader of Law and Justice who presented a more moderate face of the party, helping attract younger urban voters dissatisfied with Civic Platform.

Playing a big role behind the scenes will be Jarosław Kaczyński, the founder of PiS who served briefly as prime minister from 2006-2007. Kaczyński chose Szydło to be the party’s candidate to head up a new government, figuring that he was too divisive a figure to lead his party to victory. “I understood that I have no chances for such a position,” Kaczyński said in a newspaper interview before the election.

Kaczyński’s lower profile helped neutralize Civic Platform’s warnings of the danger of again trusting him with power.

The first words of Kaczyński's victory speech were about his twin brother Lech, Poland’s president killed in a 2010 airplane crash in Russia. “Mr. President, reporting mission accomplished,” said Kaczyński as his dead brother’s daughter, Marta, stood by his side holding a bouquet of yellow flowers.

A few minutes into the speech, he mentioned Szydło, suggesting that he may hold the real power in post-election Poland.

Civic Platform was left in deep trouble by Tusk’s departure. He is a charismatic politician who carefully steered his party to occupy the center and center-right of a generally conservative society. He chose Kopacz to replace him without an internal party contest, which was intended to block the rise of Grzegorz Schetyna, the foreign minister who was an ally turned bitter rival of Tusk.

“The goal wasn’t to win the election — for that you have to have a leadership chosen by the party — the aim was to stop Schetyna,” said a disenchanted party activist.

Under Kopacz’s leadership, Civic Platform veered to the left, ratifying a U.N. Convention on violence against women, which was strongly opposed by the Roman Catholic Church, as well as adopting a law on gender change.

“Our turn to the left led to a confrontation with the Church, which mobilized the country’s traditional electorate against us,” said Paweł Zalewski, a former Civic Platform MEP.

The winning agenda

The party was also battered by embarrassing illegal recordings of meetings among senior politicians and business leaders at pricey Warsaw restaurants.

“It wasn’t promises, but the degeneration of the ruling camp of [Civic Platform] that were the main reasons for PiS’s success,” said Maliszewski, the political scientist.

Szydło promised to backtrack a recent hike in the retirement age, increase the minimum wage, and provide a monthly payment of 500 zlotys (€120) per child to families, as well as steeper taxes on banks.

Kaczyński, meanwhile, pledged to to crack down on crime and corruption.

The dramatic shift is less about promises and policies made by both leading parties and more about the way Civic Platform was perceived, said Łukasz Mężyk, editor of 300polityka.pl, a political website. “This is a referendum on Civic Platform,” he said. “All the scandals and the tapes, Tusk, retirement age and the idea that all you had to do to win was to scare people with Kaczyński. This wasn’t an election about new policies, it was an election about new faces.”

This article was updated with new exit poll numbers