LONDON — The euro has avoided another existential crisis that might have wreaked havoc on Europe and the global economy. That was the conclusion investors divined from the first round of voting in the French presidential election, prompting exuberant buying on markets around the world on Monday.

Those in control of money looked beyond the fact that Marine Le Pen, a far-right candidate bearing intense hostility to the euro, claimed a spot in the second round of balloting on May 7. Instead, they focused on polls showing that she was likely to be defeated, and by a lopsided margin, at the hands of her sole remaining opponent — Emmanuel Macron, a pro-European figure trusted by business leaders.

For markets anxious about the prospect of a Le Pen presidency, it was as if a fire-breathing dragon hovering over the kingdom had been slain.

Stocks on French exchanges surged to a nine-year high as a wave of relief washed over the commercial realm. The value of the euro climbed nearly 2 percent against the dollar before yielding some of those gains. The gap between interest paid on French sovereign debt and rock-solid German government bonds narrowed, an indication that investors were seeing diminishing risks. The optimism spread to the United States, with American stocks up more than 1 percent and investors selling off safe havens like Treasury bonds.