Oil prices climbed on Thursday after a rocket attack on Baghdad triggered fresh concern over the potential for conflict in the Middle East, a day after markets were roiled by an Iranian missile strike on Iraqi bases hosting US forces.
But gains were muted as Washington and Tehran looked to defuse a crisis in the crude-producing region.
Brent crude futures rose 43 cents, or 0.7%, to $65.87 a barrel by 0109 GMT, after seesawing through Wednesday to end with a 4.1% tumble. They are now a little down on prices before the Jan. 3 killing of Iranian military commander Qassem Soleimani in a US drone attack that sparked the crisis.
West Texas Intermediate futures added 61 cents, or 1%, to $60.22 after falling nearly 5% in the previous session.
In Thursday's attack, two rockets fell on Baghdad's Green Zone, which houses foreign missions and government buildings. There were no casualties and no immediate claim of responsibility, but the strike served as a reminder that the region remains on tenterhooks.
"We need to be guarded about further sharp declines this week, as we will probably see more activity by proxy militias in Iraq," said Stratfor oil analyst, Greg Priddy.
Still, he said, "our view remains that in the absence of actual losses from conflict with Iran, the market will see mild downward pressure in Q1 on inventory builds."
That pressure was evident on Thursday as a result of a surprise build in US crude stockpiles last week.
Crude oil stocks were up by 1.2 million barrels in the week ended Jan. 3 to 431.1 million barrels, against analysts' forecasts in a Reuters poll for a 3.6 million-barrel drop.
Meanwhile, JP Morgan maintained its forecast for Brent to average $64.50 a barrel this year.
"The impact on oil prices will depend on (the) extent of supply disruption versus available spare capacity, global oil inventories and reaction to oil price from US producers," the bank said in a commodities research note.