European Commission President Jean-Claude Juncker wipes his brow before speaking during a media conference at EU headquarters in Brussels on Wednesday, June 22, 2016. Voters in the United Kingdom are taking part in a referendum on Thursday that will decide whether Britain remains part of the European Union or leaves the 28-nation bloc. (AP Photo/Virginia Mayo)

BRUSSELS (AP) — The EU must reinvent itself to survive after Britain’s vote to leave. It may be too late.

The damning verdict of British voters was the worst setback to the EU since the germ of a more integrated Europe first took shape in the ruins left by World War II. And it threatens to be wildly contagious — even before the ballots were all tallied, populist leaders in some of the EU’s founding nations were clamoring for a vote on EU membership in their own countries.

From Paris to Berlin to Brussels, EU leaders agree they need to change in response to the British referendum. Yet they disagree on how — on whether to tighten their union or rethink it to address those who increasingly distrust all things EU.

And before they make any lasting moves, EU decision-makers remain at the mercy of Britain’s Conservative Party and how it handles the pending divorce.

“Hurrah for the British! Now it is our turn. Time for a Dutch referendum!” said Dutch firebrand Geert Wilders, chairman of the PVV party which is leading Dutch opinion polls. The jubilation was similar at the French National Front party of Marine Le Pen.

At EU headquarters in Brussels, leaders moved swiftly to try to minimize chances that other member countries might head for the exit.

After Britain’s departure, a 27-nation EU would have to do without the world’s fifth economy, Western Europe’s top military power, a diplomatic juggernaut and a reliable bridge to the United States and the rest of the global Anglosphere.

EU Council President Donald Tusk warned that a British withdrawal “could in fact be the start of the process of destruction of not only the EU, but also of the Western political civilization.”

In retrospect, European leaders took too long to recognize the groundswell of British discontent, and never took it seriously enough, equating it only with the sometimes farcical oratorical performances of U.K. Independence Party leader Nigel Farage.

But Farage’s joyful prediction Friday that the EU is dying no longer sounded so farfetched. So more than starting to think of grand new missions for itself, the EU needs first to stanch the bleeding and protect what it has.

All eyes now turn to France and Germany, the reliable axis of the EU since its inception as the Common Market in 1958. But even there, the balance will change. With Britain’s departure, Germany will lose a pro-business ally, and the departure of the free-market island could turn the EU further toward the left.

Germany also punches far above France’s weight now, economically and inside EU institutions, and a Britain-free bloc will be even more subject to Berlin’s influence.

On the EU’s plus side, it is used to multitasking through numerous crises, and has a proven track record of muddling through to find compromises. For much of the past decade, it has had to fight the global economic crisis that already weakened support in much of its southern rim.

Then Greece threatened to tumble out of the eurozone group of nations that share the common currency, Russia annexed Crimea, and a million refugees on the EU’s borders had to be dealt with.

After all that, the European Union is still standing. But Jean-Claude Juncker, head of the EU executive, has direly labeled the body he has led since November 2014 “the last-chance Commission.”

Some EU governments may lobby for even greater European integration now that they will be rid of Britain, long the biggest thorn in the side of those seeking a more seamless and unified continent.

But in other, newer member nations like Hungary and Poland, distrust of all things EU is on the rise.

On Tuesday, EU leaders will hold a previously scheduled two-day summit, with the urgent priority what to do following the British vote. Some will be looking to punish Britain and make its exit anything but a cakewalk, if only to scare off copycats.

“If you leave, you have to assume the consequences,” said Belgian Prime Minister Charles Michel. After all, some have predicted Thursday’s vote might lead to the effective breakup of Britain, and Scottish leader Nicola Sturgeon spoke Friday of a possible second referendum on independence from the United Kingdom after a 2014 vote ended with the union intact.

The economic turmoil that may occur in an increasingly isolated Britain could also discourage other EU members from following its example.

At the same time, the pressure has increased for the EU to reinvent itself by getting closer to ordinary citizens who increasingly are critical of what they see as an aloof elite. Though by many accounts the greatest setback in EU history, the British withdrawal could also offer an opportunity.

“I always remember what my father used to tell me,” Tusk said Friday. “What doesn’t kill you, makes you stronger.”