Conflicting signals from the United States and Iran over the status of talks to end their five-month-old war boosted uncertainty on Tuesday, with the latest attack on shipping in the Strait of Hormuz highlighting risks to global energy flows.US President Donald Trump said the talks were under way on Monday, warning of a "last chance" for Tehran to sign a good deal, but Iran denied that negotiations were being held or planned.

"They are going on right now," Trump told reporters at an Oval Office event when asked about the state of negotiations, saying the sides were talking at the request of Iran, Saudi Arabia, the United Arab Emirates and Qatar, among others.

"This is a last chance for them [Iran] to sign a good document."

The comments followed Trump's weekend decision to call off "massive attacks" he said he had authorized on Iran, as talks were to be held, repeating a pattern in which he has vowed major strikes only to cancel them.

Earlier on Monday, Iranian Foreign Ministry spokesman Esmail Baghaei said no negotiations with the United States were taking place and no meetings were scheduled.