Both sides claimed victory as the truce was announced barely an hour before President Donald Trump's deadline to agree a deal or face obliteration, but Tehran warned the war was not over until formal terms were negotiated,
AFP reports.
Tehran has agreed to temporarily reopen the Strait of Hormuz, sending oil prices tumbling on Wednesday, but its demands over future control of the vital waterway, uranium enrichment and sanctions, are at deep odds with the United States.
The ceasefire was cautiously welcomed by Gulf nations, which have been pummelled by Iranian strikes for more than a month, while Pope Leo was among world leaders who urged the warring sides to broker a lasting truce.
Tehran and Washington both claimed to have won the war which began on February 28 after US-Israeli airstrikes killed Iran's supreme leader Ayatollah Ali Khamenei and kicked off a regional war.
Trump told AFP the deal was a "total and complete victory". Iran also hailed it as a win but warned it would enter talks with the US on Friday in Pakistan with "complete distrust".
The ceasefire "does not mean the end of the war" and Iran would only accept a lasting truce if its terms were met, said the Iranian National Security Council in a statement carried on state media.
Underlining the precarity of the situation, there were explosions on Wednesday morning in Bahrain's Manama, with authorities blaming "Iranian aggression".