Brent crude rose more than 3 percent and pushed back above $100 a barrel on Tuesday as mounting tension over Iran's nuclear program sparked concerns about supply threats, while hopes for economic stimulus also supported oil prices along with equities.
The U.S. crude contract settled more than 4 percent higher, while the rally sent Brent above $100 for the first time since June 11.
Iran said it had successfully tested missiles capable of hitting Israel in response to threats of military action against the Islamic Republic over its nuclear ambitions.
"I think this is positioning for geopolitical risk in the Middle East," said Bill O'Grady, chief market strategist at Confluence Investment Management in St. Louis.
"Given that oil prices are low, buying in here is cheap portfolio insurance in case an event occurs," he added.
Brent prices have recovered from an 18-month low of $88.49 a barrel set on June 22, having retreated from the 2012 peak above $128 hit in early March.
Recent data pointing to slowing global growth has fuelled hopes that policymakers in China, Europe and the United States will provide more stimulus to shore up sputtering economies.
Brent rose $3.34 to end at $100.68 a barrel, the highest settlement since May 31. Prices reached $101.58, the loftiest intraday price since front-month Brent reached $101.90 on June 11.
U.S. crude jumped $3.91 to settle at $87.66 a barrel, the highest close since May 30, after reaching $88.04 intraday.
Traders and analysts also pointed to short-covering ahead of the U.S. Independence Day holiday on Wednesday and said the strong rally had triggered buy-stop orders.
U.S. gasoline, up nearly 10 cents, and heating oil futures also rallied ahead of Wednesday's holiday.
Brent trading volume outpaced turnover for U.S. crude, with volume for both eclipsing their 30-day averages.
"The oil-price rally is motivated by growing expectation of monetary accommodation and also a return of Iran to the market's agenda," said Harry Tchilinguirian, head of commodity markets strategy at BNP Paribas in London.
In Norway, an oil and gas workers' strike was another factor supporting oil prices. The strike has slowed crude shipments from the world's eighth-largest oil exporter, although unions on Tuesday decided against escalating the action for now.
REFOCUS ON IRAN
Iran made its missile-test announcement after Iranian parliamentarians proposed a bill urging it to stop tankers taking oil to supporters of U.S.-led sanctions and a European Union embargo from passing through the Strait of Hormuz.
Iran had previously threatened to shut the strait if the EU went through with its embargo threat. About 17 million barrels a day of oil -- almost a fifth of global production -- from the top Middle East producers sailed through the narrow strait in 2011.
The EU embargo on Iranian oil took full effect on Sunday after the latest talks between Tehran and major world powers in June failed to move the parties closer to resolving the dispute over Iran's nuclear program.
U.S. equities rallied for a third day, also on expectations for economic stimulus and as oil's price gains lifted energy shares. Early lift came from better-than-expected data on new orders for manufactured goods in May.
Investors across markets are awaiting Friday's U.S. nonfarm payrolls data for June. The data is expected to show an increase in hiring from the previous month, but not by enough to dampen concerns that the economy is losing steam.
European shares closed at a two-month high, led by gains in commodity stocks and with lift from hopes for more stimulus as a relief rally at the start of the second half of 2012 continued.
The Thomson Reuters-Jefferies CRB index, a benchmark comprised of 19 commodities, gained 2.97 percent.
Industrial feedstock copper hit a seven-week high on the prospects for more monetary easing and an unexpected rise in the services sector of top metals and No. 2 oil consumer China.
Ahead of weekly reports on U.S. oil inventories, crude stocks were expected to have fallen last week, while refined products stocks edged up, a Reuters survey of analysts showed.