Sunni-ruled Saudi Arabia

Oil prices made rapid gains overnight as geopolitical tensions surged between Saudi Arabia and Iran, sparking fears of a conflict that could disrupt supplies from two major producers.

But prices retreated slightly in early Asian trade on Tuesday as traders engaged in profit-taking after both products reached levels not seen in over two years. 

"Tensions between Iran and Saudi Arabia look to be a major disruptor with markets concerned that supply could be cut off should there be any conflict", said Shane Chanel, equities and derivatives adviser at ASR Wealth Advisers in Sydney. 

Riyadh and Tehran have been trading fierce accusations over their involvement in Yemen, where Sunni-ruled Saudi Arabia and predominantly Shiite Iran back opposing sides.

In the latest flare-up Saudi Arabia said an intercepted missile attack on the country, allegedly by Tehran-backed rebels in Yemen, "may amount to an act of war".

Tehran in turn accused Riyadh of committing war crimes in Yemen, raising tensions further.

But analyst Chanel said the accusations were unlikely to spiral into full-blown conflict.  

At about 0330 GMT, US benchmark West Texas Intermediate was up four cents to $57.39 a barrel while Brent crude was down eight cents to $64.19 a barrel. 

In the mid-term, prices are likely to continue gaining ground with an OPEC-led cap on supplies likely to continue into 2018, said Greg McKenna, chief market strategist at AxiTrader.

"The Russians have been a very important driver in OPEC solidary by agreeing to play ball, but also threatening to push up production had the agreement fallen through," McKenna added. 

Crude has been on an upward trajectory in recent months as major oil producers, led by the Saudis and Russians, struck a historic deal last year to cut output by 1.8 million barrels per day for six months.

The deal was extended by nine months until March, bringing relief to the markets after a global supply glut had hammered prices since 2015.

Traders will now be looking to crude stockpile figures due later today from the American Petroleum Institute to offer an updated indication of market demand.