The most active contracts on both benchmarks jumped about 4% in the previous session.
The killings fueled concern that the 10-month-old war in Gaza between Israel and Hamas was turning into a wider Middle East war, which could potentially lead to disruptions in oil supply from the region.
Also pushing up oil prices was a set of data releases from the U.S., the world's top oil consumer, and a weaker dollar.
U.S. oil demand was at a seasonal record in May as gasoline consumption surged to its highest since before the pandemic, a separate data release from the EIA showed on Wednesday.
A weaker dollar can boost oil demand from investors holding other currencies.
Persons:
Ismail Haniyeh, Shino Mitsuko
Organizations:
Global, Brent, U.S, West Texas, United Nations, U.S . Energy, Administration, Federal Reserve
Locations:
Iran, U.S, Tehran, Lebanon, Beirut, Gaza, Israel, . U.S