Natural-gas prices swung higher on both sides of the Atlantic on Wednesday after Russia stopped exports to Poland and Bulgaria, a move that investors feared could portend deeper global supply strains ahead.

Prices climbed as traders in Europe pondered whether Russia’s action against two of its neighbors in Eastern Europe foreshadows trouble in bigger markets such as Germany’s. In the U.S., trading was driven by the prospect that producers could continue to ship abroad as much natural gas as infrastructure allows in response to tighter supply abroad.

European benchmark prices rose on Wednesday by 4.1% to settle at 107.43 euros, or about $114.28, per megawatt-hour, in a turbulent day of trading. That is well below the peak price European gas reached in March, but still roughly five times as expensive as a year ago. 

Oil markets were calm, with Brent crude, the international benchmark, gaining 0.3% to settle at $105.32. America’s domestic benchmark rose 0.3% to $102.02. Lockdowns in China meant to contain Covid-19 outbreaks have slashed investors’ views of world-wide demand, Robert Yawger, executive director for energy futures at Mizuho Securities USA, wrote in a note.

Russia’s Gazprom said Wednesday it cut off exports to Poland and Bulgaria after the two countries refused to pay for shipments in rubles. Gas buyers have traditionally paid in dollars or euros, but Russian President Vladimir Putin last month demanded that countries it deemed hostile settle contracts in Russian currency.

On its own, Russia’s move will likely have only a limited impact on European supplies—especially in Poland, which already was planning to end reliance on Russian exports by the end of this year. But bigger European economies, such as Germany’s and Italy’s, could experience shortages if Russia turns off supplies, and the growing possibility of that scenario sent prices higher, analysts said. Most European countries have rejected Russia’s demand for ruble payments.

Russia’s decision “is increasing the likelihood of a sharp curtailment of Russian gas supply into Europe,” said Jim Ritterbusch, president of energy-markets advisory firm Ritterbusch & Associates. “That’s why we’re seeing the strong gains.”

In the U.S., the benchmark price climbed 6.1% Wednesday to settle at $7.27 per million British thermal units, building on a significant surge that has lifted natural-gas prices from under $4 at the start of the year. Typically, prices decline as spring’s milder weather sets in.

As European prices rise, more U.S. natural gas has been loaded onto tankers and sent to European ports—a trade that more Russian curtailments could further encourage. That could keep heating and energy costs high even into next winter’s peak-demand period.

American exports overseas already had been rising before the Ukraine war started in February. Last year marked the first when American tanker exports of liquefied natural gas exceeded pipeline exports to Canada and Mexico, Jefferies researchers said.

“We’re probably going to be running at or near capacity levels of exported LNG through the rest of this year.” Mr. Ritterbusch said. “The market is more focused on next winter with almost as much buying at the back end of the curve as you see near term.”

U.S. prices for gas to be delivered in December were up almost as much as near-term contracts on Wednesday, rising about 4.7% to $7.59.