US President Donald Trump said the United States was speaking with Iran, a claim Tehran rejected.
Speaking at the White House, Trump said he had continued pursuing engagement after requests from Saudi Arabia, the United Arab Emirates, Qatar and other countries.
Iranian Foreign Ministry spokesperson Esmail Baghaei said Tehran was not holding talks with Washington.
Baghaei said Iran was instead discussing arrangements for shipping in the Strait of Hormuz with Oman.
Trump said reopening the strait was a principal issue and suggested it could reopen soon.
He said Iranian nuclear disarmament would take longer and repeated his demand that it occur.
Trump said Iran had a final chance to sign what he described as a good agreement, using violent language to frame the warning.
Trump also accused Iran of publicly denying talks while privately seeking a resolution.
Baghaei said an Oman-Iran understanding on a mutually acceptable shipping route was nearing completion.
He said such an understanding would not necessarily mean the strait would fully reopen.
UK Maritime Trade Operations said explosion sounds were heard near a tanker off Oman and said the vessel and its crew were safe.
The supplied accounts differ on whether that incident was reported on 2 August or 3 August.
Western countries have long alleged that Iran’s nuclear programme is intended to produce weapons, while Iran says it is for peaceful civilian purposes.
The competing statements leave unresolved whether direct US-Iran negotiations are under way or whether any agreement on maritime transit is imminent.