Oil prices erased early gains on Wednesday as weak demand fundamentals and rising supply countered elevated risk of supply disruption from conflict in the Middle East and Hurricane Milton in the United States.

Brent crude futures were down 36 cents, or 0.47%, at $76.82 a barrel by 1103 GMT while U.S. West Texas Intermediate (WTI) futures lost 43 cents, or 0.58%, to $73.14.

Brent and WTI both gained more than 1% earlier in the session after prices had plunged on Tuesday by more than 4% on a possible Hezbollah-Israel ceasefire, though markets remain wary of a potential Israeli attack on Iranian oil infrastructure.

"Despite the current heightened tensions in the Middle East, it is easy to forget that the oil market is very much vulnerable to corrections due to the ongoing bearish macro narrative centred on China," said Harry Tchilinguirian, head of research at Onyx Capital Group.

China said on Tuesday it was "fully confident" of achieving its full-year growth target but refrained from introducing stronger fiscal steps, disappointing investors who had banked on more support for the economy.

Investors have been concerned about slow growth dampening fuel demand in China, the world's largest crude importer.

Weak demand continues to underpin the fundamental outlook. The U.S. Energy Information Administration's (EIA) on Tuesday downgraded its demand forecast for 2025 on weakening economic activity in China and North America.

U.S. crude oil stocks rose by nearly 11 million barrels last week, much more than analysts polled by Reuters had expected, according to market sources citing American Petroleum Institute figures on Tuesday.

"Such a backdrop belies the war premium in oil prices at present, but it would be a brave soul indeed to dismiss what will happen to oil prices if Israel does the unthinkable and targets Iran's oil sector," said John Evans at oil broker PVM.

Investors are awaiting developments from expected talks between U.S. President Joe Biden and Israeli Prime Minister Benjamin Netanyahu over intensifying conflict in the Middle East.

The oil-producing region has been on high alert for any Israeli response to an Iranian missile attack last week in retaliation for Israel's military escalation in Lebanon.

Tehran told Gulf Arab states it would be "unacceptable" if they allowed use of their airspace or military bases against Iran and warned that any such move would draw a response, a senior Iranian official said.

The official added that there had been no discussion as yet on any potential action by Gulf states to balance oil markets if Iranian energy facilities are attacked by Israel.