Europe's longtime political center appeared to shrink Sunday as exit polls and early results from the hardest-fought European Parliament elections in decades showed both the anti-immigrant far right and the pro-environment Greens gaining ground. Turnout among the 426 million eligible voters was the highest in two decades.

The four days of balloting across the 28 European Union countries were seen as a test of the influence of the nationalist, populist and hard-right movements that have swept the continent in recent years and impelled Britain to quit the EU.

While pro-EU parties still were expected to win about two-thirds of the 751-seat legislature that sits in Brussels and Strasbourg, other contenders appeared headed for significant gains, according to projections released by Parliament.

Get Breaking News Delivered to Your Inbox

Exit polls in France indicated that Marine Le Pen's far-right, anti-immigrant National Rally party came out on top in an astonishing rebuke of French President Emmanuel Macron, who has made EU integration the heart of his presidency. Le Pen said the projected outcome "confirms the new nationalist-globalist division" in France and beyond.

In Germany, the EU's biggest country, exit polls indicated that the party of German Chancellor Angela Merkel and its center-left coalition partner also suffered losses, while the Greens were set for big gains and the far right was expected to pick up slightly more support.

Parliament is projecting that the lion's share of Britain's seats will go to the Brexit Party - 29 seats for the 31% of the vote that Nigel Farage's newly founded party was forecast to win.

The projection released early Monday showed British voters driven to extremes, with the No. 2 winners being the strongly pro-European Liberal Democrats. Coming in distant fifth were the ruling Conservatives.

Britain's electorate is divided over the delayed departure from the European Union, but the vote tallied Monday showed a universal anger at the two long-dominant parties, the Conservatives and Labour, who have led the U.K. into Brexit gridlock.

For the U.K. vote, turnout was a dismal 37%, up just over 1 percentage point from the 2014 EU election and well below the EU average this year.

Britain voted even though it is planning to leave the EU. Its EU lawmakers will lose their jobs as soon as Brexit happens.

In Italy, hardline Interior Minister Matteo Salvini's right-wing populist League was projected to become his country's largest party, jumping from around 6% of the vote during the last election five years ago to between 27% and 31% this time.

Salvini's first reaction was a tweeted photo of himself holding a handwritten message: "1st Party in Italy."

And Hungary said Prime Minister Viktor Orban's fiercely anti-immigration Fidesz party had won 13 of the country's 21 seats in the EU Parliament — one more than it had in 2014.

Turnout across the bloc was put at a 50.5%, a 20-year high. Full election results were expected overnight.

The continent-wide voting had major implications not just for the functioning of the bloc but also for the internal politics in many countries.

The balloting, which began Thursday, pitted supporters of closer European unity against those who consider the EU a meddlesome and bureaucratic presence and want to return power to national governments and sharply restrict immigration.

The results could leave Parliament's two main parties, the European People's Party and the Socialists & Democrats, without a majority for the first time since 1979, opening the way for complicated talks to form a working coalition. The Greens and the ALDE free-market liberals are jockeying to become decisive in the body.

Early projections suggested the Greens would secure 71 seats, up from 52 the last time. The Greens appeared to have done well not just in Germany but in France and Ireland.

With the elections over, European leaders will begin the task of selecting candidates for the top jobs in the EU's headquarters in Brussels. The leaders meet for a summit over dinner Tuesday. Current European lawmakers' terms end July 1, and the new parliament will be seated the following day.