It took several hours before the two countries seemed to agree that the ceasefire that US President Donald Trump proclaimed the night before really applied.
On Tuesday evening, Israel's Prime Minister Benjamin Netanyahu held a televised speech where he said that Israel had achieved a "historic victory that will be remembered for generations", reports BBC.
Netanyahu said, among other things, that the Israeli army had defeated Iran's top military leadership. In addition, a number of nuclear power plants have been destroyed.
He also praised US President Donald Trump.
Our friend President Trump has stood by our side in an unprecedented way.
Angry Trump
Earlier in the evening, Iran's President Masoud Pezeshkian in a message to the nation said that the war that was "imposed" on the country by Israel was now over after twelve days with the ceasefire.
In the statement, Pezeshkian spoke, among other things, about "the heroic resistance from our great nation, whose determination writes history", reports AFP.
Conflicting information had poured in during the day about the ceasefire that the US proclaimed.
Donald Trump was visibly angry with both Israel and Iran, after various statements about breaches of the ceasefire he himself proclaimed.
Here we have two countries that have been at war for so long and so hard that they do not know what the hell they are doing, he said to a media gathering at the White House before his trip to the NATO meeting in the Netherlands.
Do you understand that? he almost shouted, leaning forward, and then turned on his heel and walked away towards a waiting helicopter.
Gradual ceasefire
The agreement on a ceasefire is said to have been mediated by the US and Qatar. According to international media, Trump had secured a green light from Israel, while Emir Tamim bin Hamad Al Thani ensured that Iran said yes.
The plan has been described as a gradual ceasefire. Iran would start unilaterally at 6 Swedish time (7:30 Iranian time) on Tuesday.
Six hours later, Israel would lay down its arms and a further twelve hours later – thus after a day – the war would be considered over. This means at 6 on Wednesday.
Facts: War for twelve days
TT
Israel launched its attacks on Iran on the night of June 13. The stated purpose was to prevent Iran from developing nuclear weapons by destroying infrastructure linked to the Iranian nuclear energy program.
Israel has since then daily attacked Iran's nuclear energy facilities and various military targets. A number of high-ranking Iranian military personnel have been killed.
Iran has responded by attacking Israeli cities with drones and rockets.
During the night against Sunday, the US took an active role in the conflict by bombing three important Iranian nuclear energy facilities – in Fordo, Natanz and Isfahan.
On Monday evening, Iran carried out an attack on a US military base in Qatar. According to Iran, as many rockets were fired at Qatar as the number of bombs the US used against Iran's nuclear facilities during the night against Sunday.
According to Trump, Iran warned of the attack and no Americans were killed or injured.