Three elections across Europe in the past week have given the European Union reasons for joy, optimism, schadenfreude—and also plenty of cause for worry.

The joy came from Emmanuel Macron’s victory in Sunday’s second round presidential election in France. Although the independent centrist’s win was never really in doubt, the margin of victory—65 percent versus 35 percent for Marine Le Pen, the candidate of the far right—will buoy an EU that has been buffeted by waves of populism since the 2008 economic crisis, culminating last summer with Brexit, the U.K.’s stunning decision to leave the bloc. The EU establishment had all but publicly endorsed Macron over his rival, who had vowed a Brexit-style referendum should she win; nor did a hack late Friday of documents purportedly from Macron’s campaign—some genuine, others not—derail his campaign.

The EU’s reason for optimism is the performance of German Chancellor Angela Merkel’s party in a key state election Sunday. Her center-right Christian Democratic Union (CDU) defeated the governing center-left Social Democrats (SPD) in Schleswig-Holstein. With each passing state election and poll, Merkel looks more assured of comfortably winning re-election in the fall. The 62-year-old chancellor has governed Germany since 2005; a victory would give her another four-year term and keep her in office until 2021. This didn’t seem possible a year ago, when amid the refugee crisis that had engulfed Europe and in particular Germany, it wasn’t clear if Merkel would even seek re-election. But as the Western, globalized order established after World War II appeared to crumble after Brexit and Donald Trump’s election in the U.S., Merkel was firm, doubling down not only on her decision to bring in refugees, but also on the European project, which she will now likely have to reconfigure with Macron.

The EU’s schadenfreude will stem from the U.K. Independence Party’s performance in local elections last Friday in Britain. It won just one seat—and lost 140 others, a disastrous showing that has put the party’s very existence in doubt. Nigel Farage, UKIP’s public face (and a Trump ally), has long been the EU’s bête noire, resorting to exaggerations and sometimes outright lies about the EU’s influence over the U.K., and taunting his fellow members of the European Parliament after the Brexit vote. Although UKIP presented itself as the force behind Brexit, its public pronouncements on the EU and foreigners ensured it was kept well out of the ultimately successful campaign to leave the bloc. With UKIP’s future in doubt, the EU will have something to gloat about even as it rues the U.K.’s decision to leave, and expresses skepticism about the U.K.’s future without the bloc.

Six months ago, the picture looked different for the EU. The bloc was still reeling from the Brexit vote when Trump won the American presidential election, campaigning against globalization and free trade. But these concepts were fundamental pillars of the European Union, which was born as the European Coal and Steel Community in 1951, among other things to trade these commodities and ensure there would be lasting peace between France and Germany. Populism appeared to be on the rise, and in European elections scheduled for December 2016 and 2017, far-right candidates surged in polls.

In Austria, Norbert Hofer of the far-right Freedom Party was running neck and neck in the polls with the left-leaning Alexander Van der Bellen to become the next president. In the Netherlands, Geert Wilders of the far-right Dutch Freedom Party comfortably led in the polls ahead of the general elections in March. Polls in France showed the National Front’s candidate, in this case Marine Le Pen, reaching the second round for the second time in the party’s history. And in Germany, a new far-right party, the Alternative for Germany (AfD), rose amid the anger over the influx of migrants. All of these candidates and parties coalesced around the idea of a strong state, and were vehemently opposed to the EU, free trade, immigration, and globalization. In these respects they resembled their rivals on the political far left, who have also made significant, but not as spectacular, gains in Europe since the 2008 global recession. But in each election so far—Austria, the Netherlands, and France, the far-right candidate has lost convincingly. The EU’s leaders may now feel confident—but they should not.

In the French election, 4 million people cast blank ballots, a form of protest. Abstention rates were their highest since 1969. Neither of the two political movements that have dominated French politics for decades even made it to the second round. Le Pen’s performance—like those of Wilders, Hofer, and others who will no doubt come after them—shows why their movements rose haven’t gone away. The factors that enabled them, including high unemployment, immigration, and the offshoring of jobs are dominating political campaigns once again. They are serious challenges to the EU and the wider Western world. Unless the EU is willing to directly confront and address them, and resolve them to voters’ satisfaction, populists will find supporters—until these political outsiders become the political establishment.