Suspected attacks on two tankers off the coast of Iran saw oil markets erupt out of their recent slump on Thursday and kept traders gobbling up ultra-safe government bonds, gold and the Japanese yen.

Brent surged as much 4 percent after reports of the attacks added to already heightened tensions between Iran and the United States. The area is near the Strait of Hormuz, through which one-fifth of global oil consumption passes from Middle East producers.

The crude spike helped Europe's oil producers pull stock markets there higher and lift Wall Street futures.

"Whenever you have an incident in the Arabian Gulf, a little bit of nervousness always starts to kick in about that particular artery getting clogged up," CMC Markets senior analyst Michael Hewson said.

Given that oil was at five-month lows on Wednesday, people were taking precautions in case it might escalate into something more serious, he added.

"But personally I think it will be much like in the past, where you get a spike higher (in oil) but ultimately it doesn't change the underlying supply and demand dynamics."

Wall Street opened slightly higher on Thursday, despite growing doubts about any improvement in what President Donald Trump called "testy" trade relations with China before this month's G-20 summit.

"You still have a lot of uncertainty when it comes to geopolitics," said Manuel Oliveri, analyst at Credit Agricole.

"The focus is shifting to the G-20 meeting. Risk sentiment remains relatively unstable," he added, while cautioning that expectations for interest rate cuts by the Federal Reserve were keeping investor confidence from weakening further.