You can trust the pollsters again. Emmanuel Macron has been elected president of France, defeating far-right candidate Marine Le Pen, with 65% of the vote, as predicted. The 39-year-old upstart centrist, who champions globalization, social justice, and France’s role in the EU, fended off Le Pen’s calls to pull France out of the euro and ban dual citizenship.

Macron’s victory is just the latest in a string of good news for the European project. The bloc’s growing economy and unusually united leaders don’t square with all the doomsday scenarios about Trump-style populism sweeping across Europe.

Macron has a lot of hurdles ahead as president, but his win is a big setback for eurosceptics. His ascent could be just the boost the bloc needs amid a leadership vacuum and years of drifting apart. Consider that Wolfgang Schäuble, Germany’s austere finance minister, and Yanis Varoufakis, the brash former Greek finance minister, have been at each other’s throats ever since Greece nearly dropped out of the euro zone two years ago. And yet, both supported Macron’s candidacy.

If Macron’s chameleon-esque politics can bring these two together, and showcase how far the continent has come recently, the world may decide to smile upon Europe once again.

Macron is pro-Europe, in the best possible way

Macron, whose En Marche! political party is just shy of a year old, is just the sort of new blood Europe needs. A fierce critic of Brexit, he wants to ensure that the UK gets no special treatment during divorce proceedings. He also champions Greek debt relief, an issue which has bedeviled the euro zone for years because of Germany’s fierce opposition. If he can help Germany and Greece so much as inch forward on these dilemmas, it would do wonders for EU morale.

With the French and EU flags waving behind him, Macron campaigned on a promise to integrate the bloc more, despite a lot of naysaying from his opponents. In his view, France cannot address its national problems —from security and migration to trade and technology—without the rest of Europe.

While many economists argue that the euro can’t work without a proper fiscal or political union, Macron’s response is that more unity is the only answer.

In the words of his top economic advisor, Jean Pisani-Ferry, a long history of “half solutions” to all that ails Europe is precisely what has caused its many problems. Pisani-Ferry has proposed a European Monetary Fund to better tackle future crises, and joint eurobonds, in which debt would finance region-wide spending rather than just using national bonds to fund individual countries.

He makes Europe look more progressive, and prosperous

Economically speaking, Europe is in much better shape than it was a few years ago. Every country in the EU is now growing—yes, even Greece (just). Data for the first quarter of 2017 showed the euro zone economy picking up more momentum, even as UK and US GDP growth rates fell short of their forecasts.

In terms of its politics, Europe is looking rather progressive. Austria, the Netherlands, and now France have all voted in pro-European leaders, rather than inward-looking populists. The next leader of Germany, which goes to the polls in September, will likely still be Angela Merkel. The likeliest alternative, Martin Schulz, is as enthusiastic as Merkel about the EU.

Even Brexit hasn’t hurt the EU’s prospects thus far. At a summit of EU leaders held without the UK recently, the bloc’s remaining 27 members seemed unusually united on how to approach Brexit negotiations. By the Polish prime minister’s account, the atmosphere was downright festive.

But what to do about conflicted France?

It’s easy to see why Macron has taken the middle path in politics, when you consider how conflicted the French are about, well, everything. On the question of staying in Europe, for instance, France is more for than against. But when asked about free trade, immigration, and the state of its economy—all of which overlap with EU politics—the answers are a lot murkier.

For example, more than nearly any other country in Europe, the French think their country is moving in the wrong direction.

Similarly, as the euro zone’s second largest economy, France is decidedly pessimistic about the shape it’s in. Its perceptions of its economic fortunes are on par with some of Europe’s biggest losers in the euro zone crisis. That’s even though the French economy is growing at the fastest rate in six years.

To the French, more economic opening is not necessarily the answer, a sentiment Macron knows all too well. As François Hollande’s economy minister, Macron pushed for moderate reforms (link in French) to, for instance, loosen labor laws and trading rules to fall in line with EU standards. His bill was nearly scrapped, saved only by a workaround in parliament.

What’s more, the French are much more skeptical on free trade than most other countries, which goes against the very nature of the EU.

Macron has tempered his pro-trade policies with assurances that he will protect companies from the downsides of globalization and limit the bounds of free trade. For example, he proposes a ‘Buy European Act,’ that would only give public contracts to companies with at least half of their operations in Europe.

Those constraints might actually appeal to French voters, most of whom think their future is brighter within the EU. Despite Le Pen’s calls to pull France out of the euro and hold a referendum on EU membership, most of the country favors an economic and monetary union with a single currency.

Le Pen’s hardline stance on immigration—which contradicts the EU’s open borders—isn’t as important to the French as unemployment. Still, Macron’s proposed fix, to loosen labor laws and cut corporate taxes, is controversial.

France’s many contradictions will force Macron to be malleable. Flexible leadership bodes well for the European project too, which is struggling with its own mixed emotions—from Italy’s discomfort with the common currency to Greece’s still dysfunctional economy. With Macron at the helm, France and Europe can reinforce each other as they inevitably adapt to survive.