Benchmark Brent crude futures were last up 72 cents on the day at $38.00 a barrel at 1323 GMT (6:53 p.m. in India), off a session high at $38.50.
US West Texas Intermediate (WTI) futures were up 29 cents to $37.33 a barrel.
"The two questions the market is grappling with are - where next in the Saudi Arabia/Iran stand-off? I think President (Hassan) Rouhani on the Iranian side would like to calm things down and push for no further escalation," Energy Aspects analyst Richard Mallinson said.
"The second question for the market is is there any uncertainty over the exact timing and volume of the return of Iranian barrels?" he said.
The clash between the two Middle Eastern countries comes as Iran, which holds some of the largest proven reserves, hopes to ramp up oil exports following the expected removal of sanctions against it.
A series of Iranian officials vowed on Friday to expand Tehran's missile capabilities, a challenge to the United States which has threatened to impose new sanctions even as the vast bulk of its measures against Iran are due to be lifted.
"It's very confrontational. I don't think that's enough to derail (the broader lifting of sanctions), but it is prompting a few more questions about what would the timing of the return of Iranian barrels look like," Energy Aspects' Mr Mallinson said.
"The statements at the weekend by (Iranian oil officials) that Iran would only increase production at the level of the market can absorb seems to be a shift in rhetoric."
Iran plans to raise output by half a million to 1 million barrels per day (bpd) post-lifting of sanctions, although Iranian officials said they did not plan to flood the market with its crude if there was no demand for it.
Iran's oil exports have fallen to around 1 million bpd, down from a peak pre-sanctions peak of almost 3 million bpd in 2011.
The oil price surrendered earlier gains that boosted futures by as much as 2 percent after data showed Chinese factory activity shrank for a 10th straight month, prompting a 7-per cent fall on Chinese stock markets and for trading to be suspended.
Manufacturing activity in India, which the International Energy Agency believes will lead growth in oil demand this year, contracted for the first time in two years.
"Iran may decide to take more of a hardline stance against the Saudi-oriented policy of not cutting production. So far, they've been going along with it, but this renewed political vigour may prompt them to change a bit," CMC Markets analyst Jasper Lawler said.
"Really, this is still a bear market and people are just selling the bounce because (the clash) is not going to affect production. Obviously it's just tensions in the region."
Oil prices are still down by two-thirds since mid-2014 on oversupply as producers including the Organization of the Petroleum Exporting Countries (OPEC), Russia and the United States pump between 0.5 million and 2 million barrels of oil every day in excess of demand.
© Thomson Reuters 2016