Oil prices halted a big two-day slide on Wednesday, as crude climbed after Iran test-fired a series of missiles.

In late-morning trading on the New York Mercantile Exchange, the price of a barrel of light, sweet crude oil was up $1.03 US at $137.07.

The rise came after Iran test-fired nine long- and medium-range missiles Wednesday during war games in the Persian Gulf and the Strait of Hormuz.

The strait is a key waterway, as roughly 40 per cent of the world's oil production is transported through it.

Political tensions involving Iran, Israel and the United States helped push oil prices to a record intraday high of $145.85 US last week and a record high closing price of $145.29 US.

Through Monday and Tuesday, oil fell more than $9 a barrel, with market watchers attributing the drop to profit-taking, a stronger U.S. dollar and concerns that economic weakness could be spreading.

Oil prices did briefly fall into negative territory Wednesday after the U.S. government released data showing a larger than expected build-up last week in gasoline supplies. Stockpiles rose by 900,000 barrels, whereas a decline had been projected by market watchers.

The U.S. Energy Information Administration also said demand for gasoline over the past four weeks was off by 2.1 per cent compared with the same period last year.

At the same time, the EIA said U.S. supplies of oil dropped by 5.9 million barrels. A drop of 1.8 million barrels had been expected.