By Nicole Jao
NEW YORK (Reuters) -Oil settled slightly higher on Friday, but posted a weekly decline, after Iran played down a reported Israeli attack on its soil, a sign that an escalation of hostilities in the Middle East might be avoided.
Brent futures settled up 18 cents, or 0.21%, at $87.29 a barrel.
The front month U.S. West Texas Intermediate (WTI) crude contract for May ended 41 cents higher, or 0.5%, to $83.14 a barrel. The more active June contract closed 12 cents higher at $82.22 a barrel.
Both benchmarks spiked more than $3 a barrel earlier in the session after explosions were heard in the Iranian city of Isfahan in what sources described as an Israeli attack. However, the gains were capped after Tehran played down the incident and said it did not plan to retaliate.
"It was nothing but a big show, and so the markets deflated as quickly as they spiked," said Tim Snyder, economist at Matador Economics.
Investors had been closely monitoring Israel's response to Iranian drone and missile attacks on April 13 that was in turn a response to a presumed Israeli air strike on April 1 that destroyed a building in Iran's embassy compound in Damascus.
Meanwhile, U.S. lawmakers have added sanctions on Iran's oil exports to a pending Ukraine aid package after Tehran's strike on Israel last weekend.
Iran is the third largest oil producer in the Organization of the Petroleum Exporting Countries (OPEC), according to Reuters data.
The International Monetary Fund expects OPEC+ to begin increasing oil output from July, media reported on Friday.
OPEC+ members, led by Saudi Arabia and Russia, last month agreed to extend voluntary output cuts of 2.2 million barrels per day (bpd) until the end of June. That has helped keep oil prices elevated.
As oil's risk premium has gradually unwound, prices have fallen around 3% since Monday. Both benchmarks posted their biggest weekly loss since February.
Investors, however, are not ruling out the possibility that Middle Eastern tensions will disrupt supply.
Analysts from Goldman Sachs (NYSE:GS) and Commerzbank (ETR:CBKG) raised their Brent crude forecasts on Friday, taking into account geopolitical tensions as well as the prospect of rising demand and restrained supply by OPEC and allies (OPEC+).
"Oil demand is growing at a healthy pace, and supply should be constrained due to the extensions of the voluntary production cuts of OPEC+," UBS analyst Giovanni Staunovo said.
U.S. energy firms this week added oil and natural gas rigs for the first time in five weeks, energy services firm Baker Hughes said in its closely followed report on Friday.
The oil and gas rig count, an early indicator of future output, rose by 2 to 619 in the week to April 19.
Money managers cut their net long U.S. crude futures and options positions in the week to April 16, the U.S. Commodity Futures Trading Commission (CFTC) said on Friday.