Oil prices rose as much as 4% on Thursday following attacks on two tanker ships off the coast of Iran that renewed fears of conflict in the Middle East after a series of strikes last month.

The vessels sustained significant damage and their crews have been evacuated, according to shipping agents and chartering sources. The attacks occurred in the Gulf of Oman, near the Strait of Hormuz, the world's busiest sea lane for oil shipments.

It was not immediately clear who was responsible for the attacks, but they occurred against the backdrop of heightened tension in the Middle East and between the U.S. and Iran. The Iranian leadership has repeatedly threatened to block traffic in the Strait of Hormuz in retaliation for U.S. sanctions on the Islamic Republic.

Crude futures briefly jumped back above 3% after U.S. Secretary of State Mike Pompeo blamed Iran for the attacks.

U.S. West Texas Intermediate crude settled $1.14 higher at $52.22, gaining 2.2% on the day after topping out at $53.45 earlier in the session.

Brent crude, the international benchmark for oil prices, rose $1.34, or 2.2%, to $61.31 per barrel. Brent earlier rose as high as $62.64.

Earlier Thursday, oil prices fell toward five-month lows, continuing a steep slide fueled by concerns that the U.S.-China trade war will slow global growth and dent fuel demand. On Wednesday, crude futures fell 4% on the ongoing demand fears and another big jump in U.S. crude stockpiles.

OPEC on Thursday cut its forecast for oil demand growth in 2019 as the 14-nation producer group pumped at its lowest level in five years.

But the attacks in the Gulf of Oman renewed geopolitical concerns that have largely abated in recent weeks.

"This is the kind of nightmare headline that you don't necessarily want to wake up to," John Kilduff, founding partner at energy hedge fund Again Capital, told CNBC's "Squawk Box."