Oil prices recorded a weekly increase for the second time after developments in the Middle East increased market fears about the potential spread of the conflict, although US efforts to postpone the Israeli ground invasion of the Gaza Strip caused prices to fall on Friday.

After resisting postponing what officials say is a massive military operation aimed at eliminating Hamas, Israel has agreed, under pressure from the United States, to postpone the attack, according to people familiar with the effort.

Israel has changed the tone of its planning for this operation in recent days, suggesting a limited approach that may reduce the number of civilian casualties. Joe Biden said on Friday that trucks carrying aid would cross into Gaza within 24 to 48 hours.

These developments sent prices lower on Friday after a series of incidents that investors saw as increasing the possibility that the war could drag Iran into involvement, pushing futures contracts higher earlier in the day. The Israeli army said it struck Hamas targets in Gaza overnight and responded to fire from Lebanon by striking Hezbollah positions. The United States is witnessing an escalation in drone attacks in Iraq and Syria, and a US destroyer intercepted cruise missiles launched by the Houthis in Yemen towards Israel.

West Texas Intermediate crude futures for December delivery fell, settling near $88 a barrel on Friday, despite posting a second consecutive weekly gain.

Fundamental factors play a secondary role compared to the tragic events in Gaza, said Tamas Varga, an analyst at brokerage PVM Oil Associates.

The war has led to frenzied activity in the options market as investors take positions on the risk of a continued rise in oil prices. Bullish call options trading has outpaced bearish put options trading every day for about a month.

However, even the spread of the conflict may not lead to a sustained rise in prices, JPMorgan Chase analysts, including Natasha Kaneva, said in a report. They added that geopolitical risks pushed prices about $7 above the level that would have been achieved without these risks.

Away from the war, the US Department of Energy said on Thursday that it aims to purchase up to 6 million barrels for the Strategic Petroleum Reserve as it continues to replenish the stock after a record withdrawal from it.