Crude oil prices surged and U.S. stock market futures tumbled late Tuesday after Iran fired multiple missiles at air bases in Iraq housing U.S. troops, raising fears of a wider Middle East conflict. But electronic markets pared those losses as overnight trading continued, likely lessening the blow when the trading day starts Wednesday.

Iranian state TV described the attack as a revenge operation over the killing of Revolutionary Guard Gen. Qassem Soleimani by a U.S. airstrike last week. U.S. officials confirmed missile strikes at two bases in Iraq, but a U.S. official said there were no immediate reports of American casualties

The attacks — and the potential of U.S. retaliation — raise the possibility of oil supply disruptions, as well as the possibility of violence spreading around the already tumultuous region. Fears were tempered, however by tweets from Iran’s foreign minister, who said Iran did not seek further escalation, and President Donald Trump, who said “All is well” in an unusually reserved message, adding that he will release a statement in the morning.

Separately, a Ukrainian Boeing BA, +0.04% 737 jetliner crashed outside of Tehran early Wednesday, killing all 176 aboard, according to Iran state TV. Those reports said a fire struck one of the plane’s engines after takeoff.

After closing lower for the first time in three days in Tuesday’s regular trading session, oil prices rose sharply after news of the attack. The U.S. benchmark, West Texas Intermediate crude for February delivery US:CLG20 , jumped as much as 4% in electronic trading, up from a settlement of $62.70 Tuesday on the New York Mercantile Exchange. March Brent crude UK:BRNH20 , the global benchmark, began electronic trading at 8 p.m. Eastern and immediately shot up more than 4%. But prices for both benchmarks moderated as trading went on, and were last around 1% higher.

Dow Jones Industrial Average futures YM00, -0.26% fell more than 400 points immediately after the attack, but were able to pull out of their dive, and were most recently down only about 190 points, or 0.7%, to 28,332. S&P 500 ES00, -0.17% and Nasdaq 100 futures NQ00, +0.15% tumbled as well, and similarly reduced their losses. S&P 500 futures were last down 11.8 points, or 0.4% to 3,223.25, while Nasdaq futures dropped 49 points, or 0.6%, to 8,803.

“Equity markets have reversed this morning meltdown mainly due to the lack of immediate U.S. retaliation,” Stephen Innes, chief Asia market strategist at AxiTrader, said in a note. “Still, the conflict raises significant risk if it bubbles over into a regional conflict rather than the isolated U.S.-Iran friction.”

At least one analyst recommended that investors shouldn’t overreact in the short term.

“It will take some time to sort through the news to have a better feel for what it could mean to markets,” David Bahnsen, chief investment officer of The Bahnsen Group, said in an email Tuesday evening.

“What we know when Dow futures drop 400 points a day before a market open is that the majority of the time the market either closes much worse, or frequently much better. The initial response is usually not the right one. Investors would be wise to watch the response not just in equities, but in oil prices and in bond yields. And they would really be wise to watch the response over several days and maybe weeks, not minutes or hours,” he said.

February gold US:GCG20 briefly surged past the $1,600 level — its highest since 2013 — after settling Tuesday at $1,574.30 on Comex.

“Gold will be very volatile,” and American reaction will be closely watched, Chintan Karnani, chief market analyst at Insignia Consultants in New Delhi, told MarketWatch. If President Donald Trump “reacts with aggression, then gold will break past $2,000.” (That would mark an all-time high for gold prices.)

MarketWatch reporter Myra Saefong contributed to this report.