On Sunday, French voters expressed both frustration with the current situation and good sense. They elected centrist Emmanuel Macron as president by a 2-to-1 margin over Marine Le Pen of the far-right National Front.

The anti-European Union, anti-immigrant trend in Europe lost steam with the Dutch defeat of extremist Geert Wilders in March and now Le Pen’s loss in France, suggesting that German Chancellor Angela Merkel will have less of a hard time winning her fourth term in September.

The giant challenge Macron will face will come in June, when French voters will elect a new parliament. His party, En Marche, formed last year after he left the government, holds no seats. He does have the pedigree of a traditional French leader, having graduated from the elite National School of Administration, and brings experience as an investment banker and economics minister. He’ll need all that and more to tackle France’s problems, including 10 percent unemployment, immigration tensions and the terrorist threat.

It is difficult to say how he will get along with President Trump, given the generation gap (Macron is 39; Trump is 70) and Trump’s tacit support for Le Pen. They have agreed to meet at the NATO leaders meeting in Brussels on May 25, followed by the Group of Seven summit in Sicily in the following days.

In his acceptance speech, Macron acknowledged the fierce divide in France. “I will fight with all my power against the divisions that undermine us, and which are tearing us apart,” he said. Whether by default or disgust with the alternative, French voters’ choice of Macron is the best for France, for Europe and for the U.S.