Prices steadied by 1330 GMT with Brent crude futures up 1 cent at $63.67 a barrel, after hitting a session high of $64.46.
West Texas Intermediate crude futures were down 7 cents at $56.71 after the US benchmark hit a session high of $57.32.
Iran said the vessel, which it did not identify, was smuggling fuel and had been carrying 1 million litres, or around 6,200 barrels, in the area of Larak Island and had 12 foreign crew.
Britain pledged to defend its shipping interests in the region, and US Central Command chief General Kenneth McKenzie said the United States would work "aggressively" to enable free passage after recent attacks on oil tankers in the Gulf.
"The oil price reaction on Thursday shows once again that the conflict in the Middle East is far from solved and tensions could flare up at any time," UBS analyst Giovanni Staunovo said.
"As oil keeps flowing, prices are likely to rise only temporarily," Staunovo added.
Iran said the vessel impounded was the one it towed on Sunday after the ship had sent a distress call. US officials said on Wednesday they were unsure whether an oil tanker towed into Iranian waters had been seized or rescued.
Reuters reported on Wednesday that shipping companies were hiring unarmed security guards for voyages through the Gulf.
Oil had fallen on Wednesday in response to a sharp rise in US stockpiles of products such as gasoline that pointed to weak demand during the US driving season.
Data from the US Energy Information Administration showed a larger-than-expected drawdown in crude stockpiles last week.
Gasoline stocks rose by 3.6 million barrels, however, compared with analysts' expectations in a Reuters poll for a 925,000-barrel drop.
The gasoline build was "especially remarkable in the week after the Independence Day weekend", analysts at Commerzbank wrote.
The summer driving season normally entails increased consumption of gasoline.
US President Donald Trump's threat to impose additional tariffs on China has also pressured oil prices, with nerves on edge over when talks between the two countries will resume to resolve a trade war that has slowed global growth.
Barclays on Thursday lowered its oil price forecasts for the second half of this year and 2020.