Right-wing parties put on a show of strength in European Union elections, prompting French President Emmanuel Macron   to call national elections and underscoring German Chancellor Olaf Scholz ’s position lagging behind two rival parties, according to initial projections.

Sunday’s results still appeared to leave the mainstream pro-EU parties with a lock on power in Brussels. The center-right EU political grouping that now leads the bloc looked set to win the most seats in the European Parliament, boosting European Commission President Ursula von der Leyen ’s hopes of keeping her job for a second term. She has forged a close working relationship with the Biden administration.

Still, France’s far-right opposition party National Rally looked set to be among the pan-European election’s biggest winners. Marine Le Pen ’s party appeared on target to become the largest single party in the European Parliament. Projections based on early ballot counts on Sunday evening suggested National Rally had gained roughly 31% of the vote, twice the support for Macron’s Renew Party.

After the French results, Macron announced that he was dissolving parliament to call fresh elections. His party already lacked a majority in the National Assembly. The first round of the elections will take place June 30, followed by a second on July 7, Macron said.

Jordan Bardella, President of the French far-right National Rally (Rassemblement National – RN) party and head of the RN list for the European elections, and Marine Le Pen, President of the French far-right National Rally party parliamentary group, take the stage to address party members after the polls closed during the European Parliament elections, in Paris, France, June 9, 2024. REUTERS/Sarah Meyssonnier TPX IMAGES OF THE DAY

“I have decided to give you back the choice of our parliamentary future through an election,” he said.

National Rally leader Jordan Bardella said Sunday’s results marked an “unprecedented rout for the powers that be,” adding that it was “day-one of the post-Macron era.”

In Germany, Scholz’s Social Democratic Party also apparently faced a drubbing. According to national exit polls, it was running third behind the far-right Alternative for Germany and the clear winner, Germany’s opposition center-right alliance.

The elections, held from Thursday through Sunday, were for the 720 members of the European Parliament. Up to 370 million voters were eligible according to EU figures, although turnout in the elections is usually modest.

While the European Parliament’s main powers are to approve or amend EU rules, laws and trade deals, the twice-decade vote offers a potent indicator of Europe’s political mood. The legislature also gets to approve the EU’s new leadership team.

Sunday’s results point to trouble for the EU leadership’s ability to pursue its environmental goals and indicate that pressure will mount to tighten migration rules. The vote is also likely to give a greater voice, at least within the parliament, to nationalist and left-wing critics of EU support for Ukraine .

Despite pro-EU parties’ setbacks, they appeared to hold enough seats to cobble together a majority of lawmakers to approve their priorities. An assessment from exit poll-aggregator Europe Elects suggested that center-right, centrist and center-left political blocs would secure 407 seats in the new parliament, or 57% of the chamber, according to the European Parliament press service based on provisional national results. Right-wing nationalist parties look set to secure roughly 155 votes.

While the results push European politics to the right, divisions among the nationalist and far-right EU parties are likely to blunt the impact of their gains. Some right-wing leaders have called for an alliance across the movement, but that appears unlikely.

F People vote at a polling station during EU elections in The Hague, Netherlands June 6, 2024. REUTERS/Lewis Macdonald

The solid performance of the center-right EU bloc will bolster the chances of von der Leyen remaining at the EU’s helm The first woman to hold the position, she needs backing from the bloc’s 27 national leaders and approval in the European Parliament to stay in power.

“We are the strongest party,” von der Leyen said at a rally as results came in. “We are the anchor of stability and voters acknowledged our leadership during the last five years.”

The German result looks set to inject fresh instability in the coalition government, which has become increasingly fractious as national elections approach in 2025. There have been some voices in the three-party coalition calling for early elections. The government will face further tests of its political fortunes in regional elections later this year.

Macron’s decision to call legislative elections is a big gamble, which depends on Le Pen’s victory on Sunday producing a backlash among voters who fear the National Rally taking power. In the past, centrist, leftist and center-right have forged winning alliances against Le Pen in the final round of presidential elections.

Thibault Francois, a National Rally lawmaker and the party’s European affairs spokesman, said Macron’s decision was inevitable.

“He was unable to rule after such a defeat,” he said .

Among other successful results from nationalist parties, exit polls suggested Austria’s Freedom Party came first. In the Netherlands, the party of Geert Wilders , an antimigrant firebrand who won last November’s national elections, picked up several seats in the Parliament, final results showed, although his party finished second to a center-left Green alliance.

Peter Magyar, former government insider and leader of the Respect and Freedom (TISZA) Party, celebrates with his supporters after the announcement of the partial results of the European Parliament and municipal elections, in Budapest, Hungary, June 10, 2024. REUTERS/Bernadett Szabo

One of the EU’s most powerful conservative leaders also performed well: Italian Prime Minister Giorgia Meloni ’s Brothers of Italy party is expected to come first, with around 28.5% of the vote, according to the European Parliament, based on provisional results.

Meloni, who won power in 2022 on a strong antimigration platform but has repositioned herself as a mainstream conservative, playing down her far-right roots, is being courted by the center-right and the hard right to form an alliance in Brussels.

In Poland, the current centrist government scored another win over the previous right-wing conservative government following national elections last year. Nationalist forces performed weakly in Sweden, Finland and Denmark. Spain’s two center-left and center-right parties were far ahead of more radical parties, according to exit polls.

And while veteran Hungary Prime Minister Viktor Orban ’s Fidesz party came first in his country’s vote, with 44%, a new opposition party formed by a former Orban ally scored well, at 31%, according to exit polls. After most results were in, Orban claimed victory.

“Stop migration, stop gender, stop war…stop Brussels,” Orban said.

Among the evening’s biggest losers were Europe’s green parties, which performed well five years ago on the back of mounting concerns about climate change. Continent-wide protests from farmers and rising voter concerns about the costs from green policies have since shifted the political mood.

The continent’s most powerful Green Party, the junior coalition party in Scholz’s government, picked up just 12% of the vote, down from over 20% in 2019.

Write to Laurence Norman at laurence.norman@wsj.com and Noemie Bisserbe at noemie.bisserbe@wsj.com