Casting ballots in 27 countries, voters largely backed centrists in European Parliament elections, but far-right parties made serious inroads in France and Germany.

Partial results made public late Sunday showed that centrist political groups were poised to lose some seats, but still maintain a clear majority of more than 400 seats in the 720-seat assembly.

Even so, the outcome seemed likely to steel the far right as a disruptive force and unsettled the bloc’s mainstream establishment.

The balloting indicates that the prevailing winds have grown chill for some of Europe’s political establishment and underscored that the momentum of the far-right forces over the past decade had yet to crest.

In France, the voting ushered in a political earthquake. Soon after the results were announced, President Emmanuel Macron announced on national television that he would dissolve the country’s National Assembly and call for new legislative elections.

“The rise of nationalists and demagogues is a danger for our nation and for Europe,” he warned.

The outcome may put Marine Le Pen, Mr. Macron’s main rival, in her strongest position yet to challenge the French mainstream in presidential elections three years from now. Mr. Macron must step aside then because of term limits.

The far-right Alternative for Germany party, or AfD, officially labeled a “suspected” extremist group by the German authorities, also had a strong showing.

Projections gave the party about 16 percent of the vote. The result placed AfD behind the mainstream conservative Christian Democratic Union, but ahead of Chancellor Olaf Scholz’s Social Democrats, making it the country’s second-ranking party.

European Parliament groups that hold a nationalist, anti-immigrant agenda will now likely control about 130 seats, a better showing than the last election in 2019.

Right-wing parties now govern alone or as part of coalitions in seven of the European Union’s 27 countries. They have gained across the continent as voters have grown more concentrated on nationalism and identity, often tied to migration and some of the same culture-war politics pertaining to gender and L.G.B.T.Q. issues that have gained traction in the United States.

The strong far-right showing was likely to reverberate even in the United States, where it can be expected to hearten kindred political forces loyal to former President Donald J. Trump as he seeks a return to office.

Other factors contributing to the right’s rise include lingering anger over Covid-era policies, as well as the inflation that grew in the wake of the pandemic and as a consequence of the war in Ukraine, which pushed Europe to turn away from cheap Russian energy.

The election exposed real weaknesses for the governments in France and Germany, the E.U.’s core members. Traditionally, little can happen in the bloc without their leadership.

“With Trump possibly over the horizon and a major war in Europe, there’s a serious question over how Europe will be able to respond to these threats in light of the weakness in France and Germany back home,” said Mujtaba Rahman, Europe director at the Eurasia Group consultancy.

European Union leaders have already watered down environmental policies and overhauled the bloc’s migration policies to address concerns by traditional conservative and voters farther on the right. But the electoral success of more radical right-wing parties could lead to still tighter borders and a paring back of the E.U.’s climate ambitions.

Despite the gains for the far right, the mainstream conservative group in the European Parliament, the European People’s Party, was set to hold first place and score significant gains, with 189 seats, 13 more than in the last election. But the two other centrist parties took losses, eroding the political center on the European level.

The Progressive Alliance of Socialists and Democrats was set to finish second with 135 seats, losing four. And the Renew group, a liberal political grouping, were poised to lose one in five of their seats, finishing with 83.

Ursula von der Leyen, the president of the European Commission and a member of the European conservatives, celebrated her party’s victory and issued an open call to other centrists to work with her to guarantee “a strong and effective Europe.”

“We are an anchor of stability,” Ms. von der Leyen told reporters at the European Parliament in Brussels late Sunday evening. “The result,” she said, “comes with great responsibility for the parties of the center. We may differ on individual points, but we all have an interest in stability.”

The election’s biggest losers seemed to be the Greens, who saw their support crater by a quarter compared with five years ago. Still, the Greens, with their 53 seats, could play an important role bolstering centrist majorities as an alternative to further-right parties.

Final figures from all 27 E.U. countries were expected to be made public early Monday.

The results seemed largely to maintain the balance of power in the European Parliament, which approves legislation, the bloc’s budget and its top leaders, including the president of the mighty European Commission, the E.U.’s executive branch.

The first test of the weaker centrist majority will be over the approval of the new European Commission president, set to take place in July.

Ms. von der Leyen, who was approved for her job five years ago by the narrow margin of just nine votes and is likely to be nominated again, will need to lobby intensively to secure her appointment.

Having narrowly dodged needing to bring radical right-wing parties behind her, a scenario that would have alienated centrists, she will now likely face demands for more moderate policy commitments on climate in particular, by the Socialists and Liberals whose votes she’ll need to secure a second term at the helm of the Commission.

Her agreement with the potential centrist partners on migration and on Ukraine will make for a smoother process.

A simple majority vote is required to approve the European Commission president, but it is done by in secret, a factor that has in the past led to attrition among presumed supporters.

Aurelien Breeden contributed reporting from Paris.

world