New York's main contract, light sweet crude for August, soared $3.91 to close at $87.66 a barrel.
In London trade, Brent North Sea crude for delivery in August settled at $100.68 a barrel, jumping $3.34 from Monday's closing level.
"With Iran oil out and Norway on strike it is giving the oil market reason to bounce!" said Phil Flynn at Price Futures Group.
Crude prices had fallen Monday in the wake of weak economic data in China, the world's biggest energy consumer; the first fall in US manufacturing in three years; and as markets assessed the impact of a European Union embargo on Iranian oil.
Full implementation of an EU embargo on Iranian oil took effect on Sunday, provoking anger in Tehran, which says the measures will hurt talks with world powers over its contested nuclear activities.
On Tuesday, oil prices surged higher after Iran test-fired missiles into its central desert region, drawing a US warning that the tests were in violation of UN resolutions that ban Iran from any ballistic weapons activity.
Meanwhile, some 120 lawmakers in Iran's 290-seat parliament backed a draft bill calling for the strategic Strait of Hormuz to be closed to oil tankers headed to Europe in retaliation for an EU embargo on Iranian crude.
Oil market observer bodies and analysts say the EU embargo, coupled with US financial sanctions ramped up on Thursday, are gutting Iran's vital oil exports, which account for half of government revenues.
The International Energy Agency says Iranian crude exports in May appear to have slipped to 1.5 million barrels per day (mbpd) as the market braced for the embargo, which has been phased in since being announced January 23.
Oil prices also gained support from a 10-day-old strike by more than 700 North Sea oil workers in Norway. The union action over pensions has cut about 10 per cent of the total production of the world's eighth-largest oil exporter, according to the Norwegian Oil Industry Association.
What the stars mean:
★ Poor ★ ★ Promising ★★★ Good ★★★★ Very good ★★★★★ Exceptional