Oil prices were on track for weekly gains of 9% as investors feared a wider Middle East conflict could disrupt crude flows after President Joe Biden said the United States was discussing an Israeli attack on Iranian oil facilities.

Brent crude futures were up 66 cents, or 0.85% at $78.28 a barrel, as of 1323 GMT. U.S. West Texas Intermediate crude futures were up 63 cents, or 0.85%, at $74.34 a barrel.

The U.S. is discussing whether it would support Israeli strikes on Iran's oil facilities as retaliation for Tehran's missile attack on Israel, Biden said on Thursday, while Israel's military hit Beirut with airstrikes in its battle against Lebanese armed group Hezbollah.

Iran raised the stakes when it fired missiles at Israel on Tuesday, partly in retaliation for Israel's killing of Hezbollah secretary general Sayyed Hassan Nasrallah.

Israel could attack Iran's refineries or main Kharg Island oil export terminal, with the aim of disrupting the country's oil revenues, JPM commodities research analysts said.

"This option, however, is unlikely to gain favor with the U.S. administration, which would be wary of disrupting oil markets in the weeks leading up to the presidential elections," the analysts added.

Iran will target Israeli energy and gas installations if Israel attacks it, the semi-official Iranian news agency SNN quoted Revolutionary Guards deputy commander Ali Fadavi as saying on Friday.

Iran is a member of the Organization of the Petroleum Exporting Countries with production of around 3.2 million barrels per day or 3% of global output.

While concerns over oil supply have driven crude prices higher, global crude supplies have yet to be disrupted in the Middle East even after months of unrest.

The market's gains have also been capped by OPEC's spare production capacity.

Easing supply fears, Libya's eastern-based government and Tripoli-based National Oil Corp on Thursday said all oilfields and export terminals were being reopened after a dispute over leadership of the central bank was resolved.

This should allow the country to more than double its production levels, restoring them to about 1.2 million bpd.

(Reporting by Ahmad Ghaddar in London and Arunima Kumar in Bengaluru; Additional reporting by Gabrielle Ng in Singapore; Editing by Hugh Lawson, Louise Heavens and Barbara Lewis)