Veterans of European crises got a sickening sense of deja-vu this past week.

After French President Emmanuel Macron called snap parliamentary elections, European stock markets sold off, the euro dipped and, most ominously, the yield on French government bonds jumped, with the spread over German yields hitting its highest since 2017.

The reason: fears that the far-right, euroskeptic National Rally, headed by Marine Le Pen , after trouncing Macron’s centrists in European Parliament elections , could emerge to lead the French government. (Regardless of the outcome, Macron will remain president through 2027 and in charge of foreign and defense policy.)

Since a debt crisis beginning in Greece in 2009 almost destroyed the euro, investors have been alert to anything that threatens the survival of the European Union or the common currency shared by 20 of its 27 members.

But an RN victory wouldn’t qualify. As Europe’s far-right parties have crept closer to power, their stated goals have shifted from leaving the EU to reforming it from within. The underappreciated story of Europe’s election season isn’t the fragility of the EU and euro, but their resilience.

This runs counter to the overall retreat of globalization and supranational governance that began in 2016 with Brexit, Britain’s vote to leave the EU, and Donald Trump ’s election as president on a nationalist, protectionist platform.

The National Rally was founded as the National Front in 1972 by Jean-Marie Le Pen , who bashed Muslims, denied the Holocaust and called the Maastricht Treaty, which paved the way for euro introduction in 1999, the “death of France…concocted secretly in the offices of internationalist technocrats and the dens of international financiers.”

Le Pen’s daughter Marine took over the party in 2011 and then expelled her father in 2015 in an effort to make the party more acceptable to mainstream voters. But she retained her father’s hostility to immigration, the EU and the euro.

The debt crisis that began in Greece in 2009 exposed the common currency’s underlying contradictions. By allowing countries with higher inflation such as Greece and Spain to borrow at the same low interest rates as Germany, it fueled the growth of unsustainable debts.

Yet the euro survived because its political popularity trumped its economic flaws: The public feared having their savings redenominated into a depreciating local currency. The political and economic chaos of Brexit discouraged other countries from following suit. It was a key reason Marine Le Pen lost decisively to Macron in the 2017 presidential election.

Inflation in recent years has only heightened mistrust of monetary adventurism. Even leaders skeptical of free markets, such as the newly elected president of Mexico and the re-elected president of South Africa, have had to affirm the independence of their central banks. Trump, should he be elected this fall, might find tampering with the Federal Reserve’s independence, as some allies propose , unpopular.

In recent years, right-wing movements have been busy recanting plans to ditch the EU and the euro, while remaining adamantly opposed to immigration. “Our Macronist opponents accuse us…of being in favor of a Frexit [French Brexit], of wanting to take power so as to leave the EU,” Jordan Bardella , the RN’s candidate for prime minister, said in May. But “you don’t leave the table when you’re about to win the game.”

In previous campaigns, RN backed a referendum to make French law superior to EU law, in violation of the bloc’s rules, but hasn’t highlighted the pledge in the current campaign.

After the populist Party for Freedom won the Netherlands’ election in the fall , leader Geert Wilders dropped a longstanding demand for a referendum on EU membership.

After becoming prime minister of Italy, Giorgia Meloni did a U-turn from vocal EU critic to team player, backing support for Ukraine and cooperating on a fix for Italy’s finances. Germany’s AfD still wants out of the EU, which may be one reason it performed poorly in the European Parliament elections.

Some far-right parties’ embrace of the EU may be tactical rather than philosophical. And even if their shift is real, they can still paralyze EU decision-making from within, whether on climate or refugee policy or sanctions on Russia, as Hungarian leader Viktor Orbán   has done for years.

The RN still has many positions at odds with EU membership, from favoring French companies for government contracts to opting out of the European electricity market.

The key flashpoint, though, is France’s shaky finances. Last year its budget deficit was the eurozone’s second largest, after Italy, as a share of gross domestic product, at 5.5% and its debt, at 111%, was third highest. The RN’s previously stated plans, which include slashing the value added tax on energy and rolling back Macron’s increase in the pension retirement age, could boost the deficit further.

On Wednesday the European Commission, the bloc’s executive arm, notified Paris it was in breach of the bloc’s 3% deficit limit, which is supposed to lead to negotiations on a remedy.

Brussels has long given France a long leash on deficits because it is politically and financially too important to fail. A showdown with an RN government could fray the bloc’s credibility and cohesiveness.

Yet even if it defies Brussels, the RN’s room for maneuver remains circumscribed by the euro. French bond yields have risen because, unlike the U.S. and Britain, who have larger deficits as a share of GDP, France doesn’t control the currency in which it borrows and is thus at greater risk of default. (Investors may also fear a victory by the far left, whose plans to spend more, such as on housing and pensions, are even more radical.)

The European Central Bank can buy member nation bonds whose yields have risen excessively—provided the country is fiscally sound or headed that way. If RN obstinacy caused bond yields across the eurozone to shoot up, Krishna Guha of Evercore ISI thinks the ECB might support the bonds of cooperative countries such as Italy but not “the country that is causing the stress,” i.e., France. The turmoil, he argued in a recent report, “would almost certainly end in a new RN government either falling or reaching some compromise” with Brussels.

Le Pen and Bardella no doubt understand these constraints, which may be why they have begun hedging their plans, making them conditional on the outcome of a public audit.

The far right might want a different path from the rest of Europe, but its freedom is limited if it wants to keep the euro. And voters clearly do.

Write to Greg Ip at greg.ip@wsj.com