NEW YORKNEW YORK (Reuters) - Oil futures fell more than 4% on Wednesday in a wild swing, soaring close to a four-month high in early trade on an Iranian rocket attack on U.S. forces in Iraq before retreating as the countries quickly ratcheted back tensions.

Prices fell as it became evident the rocket attack did not damage oil facilities or harm any Americans, with more pressure coming from a surprise build in U.S. crude stockpiles.

U.S. President Donald Trump backed away from days of angry rhetoric against Iran as the two countries tried to defuse a crisis over the American killing of Iranian military commander Qassem Soleimani.

ADVERTISEMENT

"The fact that we have this great military and equipment ... does not mean we have to use it," Trump said in an address from the White House, noting Iran appears to be standing down.

Before Trump's address, prices were already retreating from overnight highs after tweets by the U.S. president and Iran's foreign minister signaled at least temporary calm.

Brent futures LCOc1 fell $2.83, or 4.2%, to settle at $65.44 a barrel, their lowest close since Dec. 16. In early trade, the contract hit its highest since mid-September at $71.75.

The global benchmark had been trending higher since hitting an October low of $56.15 per barrel; the session high on Wednesday was 28% above that level.

U.S. West Texas Intermediate (WTI) crude CLc1 fell $3.09, or 4.9%, to settle at $59.61 per barrel, its lowest close since Dec. 12. The session high of $65.65 was the highest since late April.

"Volatility to the extreme might best describe today’s price action as the crude benchmarks sold off ... roughly 9% from the overnight highs," Jim Ritterbusch, president of Ritterbusch and Associates in Galena, Illinois, said in a report.

ADVERTISEMENT

The spreads between the session high and low were the widest for WTI since November 2014 and Brent since September 2019.

The U.S. Energy Information Administration (EIA) said crude inventories rose 1.2 million barrels last week. That build surprised the market which had expected a 2.6 million-barrel decrease, and contradicted preliminary industry data showing a 5.9 million barrel decline.

"A triumvirate of bearish builds in the weekly EIA reports is adding momentum to crude's overnight price reversal as fears of escalating tension are unwound," said Matt Smith, director of commodity research at ClipperData, noting a big drop in refinery runs, a rebound in imports and an easing of exports.

Iran's missile attack on U.S.-led forces in Iraq came hours after the funeral of Soleimani, commander of the country's elite Quds Force who was killed in a U.S. drone strike on Jan. 3.

Tehran fired more than a dozen ballistic missiles at two Iraqi military bases hosting U.S.-led coalition personnel, the U.S. military said.

GRAPHIC: Iran fires missiles at U.S bases in Iraq, here

ADVERTISEMENT

"Iran took and concluded proportionate measures in self-defense," Iranian Foreign Minister Mohammad Javad Zarif said on Twitter. "We do not seek escalation or war, but will defend ourselves against any aggression."

The United Arab Emirates' energy minister said he saw no immediate risk to oil passing through the vital gateway of the Strait of Hormuz.

GRAPHIC: Oil, gold prices retreat after initial surge following Iran's attacks on U.S. forces in Iraq, here

(Additional reporting by Laila Kearney in New York, Julia Payne in London, Aaron Sheldrick and Yuka Oyabashi in Tokyo and Florence Tan in Singapore; Editing by David Gregorio and Marguerita Choy)