Emmanuel Macron suffered defeat at home in the European elections but could console himself with securing a kingmaker role that could determine the next five years of EU politics.

The ardently Europhile French president was narrowly beaten by Marine Le Pen’s virulently anti-EU National Rally in the French vote but stands to benefit from a fragmentation in support for the older centrist parties in the European Parliament.

Ever since the first European elections in 1979, the centre-right European People’s Party and centre-left Socialists and Democrats have dominated EU politics. They operated, formally and informally, a grand coalition, sewing up the EU’s top jobs and gaming the approval of Brussels’ rules and regulations as they pass through the European Parliament, which has an influential say over draft legislation from the European Commission.

For the first time in 40 years, it emerged on Sunday night, the EPP and S&D, the two largest, would be unable to form a joint majority of at least 378 MEPs in the 751-seat parliament. That majority is needed to both pass EU law and appoint the leadership of the next European Commission.

The traditional centrist parties bled support to a record number of Eurosceptic MEPs and a “green wave” that saw Greens do well in some EU countries. National parties form themselves in like-minded pan-EU political alliances to qualify for increased speaking time, influence and EU funding.