Image copyright Getty Images

Oil prices have receded, after rising following an Iranian attack on two bases hosting US troops in Iraq.

Financial markets were also relatively calm despite the conflict, amid investor hopes that the two sides would avoid further escalation.

US President Donald Trump said he would seek additional economic sanctions, but he stopped short of calling for military action.

The three main share indexes in the US closed the day up about 0.5% or more.

While oil prices had jumped to an almost four-month high overnight, they fell back during trade on Wednesday. Brent Crude was down more than 3% to about $65.78 per barrel by mid-day in New York and West Texas International fell more than 4%.

Despite that pullback, oil prices remain nearly 25% higher over the last 12 months, due in part to rising tensions in the Middle East.

Iranian state television said the attack was a retaliation for the killing of the country's top commander Qasem Soleimani.

The attack happened just hours after the funeral service for Soleimani, who was killed by a US drone strike on Friday.

His death had raised concerns that the conflict between the US and Iran could escalate further.

That could disrupt shipping in the world's busiest sea route for oil, the Strait of Hormuz. Around a fifth of global oil supply passes through the strait which connects the Gulf with the Arabian Sea.

The Strait of Hormuz is vital for the main oil exporters in the Gulf region - Saudi Arabia, Iraq, the UAE, and Kuwait - whose economies are built around oil and gas production. Iran also relies heavily on this route for its oil exports.

Qatar, the world's biggest producer of liquefied natural gas (LNG), exports nearly all its gas through the strait.

After the latest attacks, the US aviation regulator banned American airlines from flying over Iraq, Iran and neighbouring countries. The ban includes the Gulf of Oman and the waters between Iran and Saudi Arabia.

The Federal Aviation Administration (FAA) said the decision was in response to heightened military activity, and increased political tension in the region.

Before the latest guidance, the FAA had already prohibited US airlines from flying below 26,000 feet (7,925 metres) over Iraq and from flying over an area of Iranian airspace above the Gulf of Oman since Iran shot down an American drone in June 2019.

At the same time Singapore Airlines has said that all of its flights would now be diverted from Iranian airspace.