Far-right parties rattled the traditional powers in the European Union with major gains in parliamentary seats, dealing an especially humiliating defeat to French President Emmanuel Macron, who called snap legislative elections.

Some ballots in the vote for the European Parliament were still being counted Monday, but the outcome showed the 27-nation bloc’s parliament membership has clearly shifted to the right.

Italian Premier Giorgia Meloni more than doubled her party’s seats in the assembly. And despite being hounded by a scandal involving candidates, the Alternative for Germany extreme right party still rallied enough seats to sweep past the slumping Social Democrats of Chancellor Olaf Scholz.

Sensing a threat from the far right, the Christian Democrats of EU Commission President Ursula von der Leyen had already shifted further to the right on migration and climate ahead of the elections.

It was rewarded by remaining by far the biggest group in the 720-seat European Parliament and de facto brokers of the ever-expanding powers of the legislature.

But the surge by nationalist and populist parties across Europe will make it much harder for the assembly to approve legislation on issues ranging from climate change to agriculture policy for the next five years.