BRUSSELS — The results this week of the European Parliament elections were a humiliating blow at home to President Emmanuel Macron of France, as his party finished second to the far-right nationalist Marine Le Pen.

But in the Parliament itself, his party could be the kingmaker because there will be no working majority without it.

That gives Mr. Macron, who has been the biggest booster among European leaders of deeper integration between European Union members, an opportunity to push through change — and to counter the populist and nationalist right.

Mr. Macron’s party — which did not even exist in the last European elections in 2014 — together with a group of liberal parties can create a sustainable working majority of pro-European parties.