SINGAPORE - Oil prices rose on Thursday, extending gains from the previous session, after the killing of a Hamas leader in Iran raised the threat of a wider Middle East conflict and concern over its impact on oil.

Global benchmark Brent crude futures rose 78 cents, or 1%, to $81.62 a barrel by 0800 GMT, while U.S. West Texas Intermediate crude futures gained 79 cents, also 1%, to $78.70 a barrel.

The most active contracts on both benchmarks jumped about 4% in the previous session.

Hamas leader Ismail Haniyeh was killed in the Iranian capital Tehran on Wednesday. His death came less than 24 hours after the most senior military commander of Lebanon-based militant group Hezbollah was killed in an Israeli strike in Beirut.

The killings fuelled concern that the 10-month-old war in Gaza between Israel and Hamas was turning into a wider Middle East war, which could lead to disruption in oil supply from the region.

"Oil markets are justifiably worried that the assassination of Haniyeh will bring Iran more directly into the war with Israel. And that could put at risk Iran's oil supply and related infrastructure," analyst Vivek Dhar at Commonwealth Bank of Australia, wrote in a client note.

Dhar said markets will be worried about Iran's ability to escalate tension via its control of the Strait of Hormuz.

"Blockading the key waterway threatens the transport of 15-20% of global oil supply. With limited spare pipeline capacity to bypass such a blockade, the Strait of Hormuz looms as a major potential disruption risk for oil markets," said Dhar.

Also pushing up prices was a set of data releases from the U.S., the world's biggest oil consumer, and a weaker dollar.

Robust export demand pushed U.S. crude oil stockpiles lower by 3.4 million barrels in the week ended July 26 to 433 million barrels, data from the U.S. Energy Information Administration (EIA) showed on Wednesday.

Meanwhile, the U.S. dollar index extended losses on Thursday from the previous session, after the Federal Reserve held interest rates but left the door open for a cut in September. A weaker dollar can boost oil demand from investors holding other currencies.

In the longer term, however, investors are not confident of Chinese demand, said Phillip Nova analyst Priyanka Sachdeva, adding that this concern will continue to limit the upside in oil prices.

Official data from China on Wednesday showed that manufacturing activity slipped to a five-month low in July as factories grappled with falling new orders and low prices.

A private sector survey on Thursday also showed China's manufacturing activity in July shrank for the first time in nine months as new orders declined.

(Reporting by Paul Carsten in London, Shariq Khan in New York and Emily Chow in Singapore; Editing by Tomasz Janowski and Jason Neely)