Iran has suffered a great deal of destruction in the 40-day war.

More than 3,000 people have been killed, human rights activists say, and US President Donald Trump had threatened further deaths and destruction on an even greater scale.

Even among the hardliners, it was becoming clear that a way out had to be found before Iran’s critical infrastructure was further destroyed.

Only hours before the announcement of the ceasefire, the hardline Chief Justice, Gholamhossein Mohseni Ejei, told Iranian state TV that Iran was seeking an end to the war while still maintaining an upper hand.

He was broadly repeating what the country’s former foreign minister Mohammad Javad Zarif, a moderate, had written a few days earlier in an article in the US publication Foreign Affairs.

The SNSC has portrayed the ceasefire agreement as a victory for Iran, calling on regime supporters to remain united.

According to Iranian media, the Speaker of Parliament, Mohammad Bagher Ghalibaf, is to lead the Iranian delegation in talks with the US in Islamabad, directly negotiating with US Vice President JD Vance.

This is another departure from the hardline script. Direct negotiations with the US had always been banned by the former Supreme Leader, Ayatollah Ali Khamenei, who was killed in an Israeli strike on his home at the outset of the war.

This direct contact appears to have been sanctioned by the new leader, who is his son.

Despite the ceasefire, Iran and the US remain far from a lasting peace.

The war could resume if the talks break down. That is a prospect some Iranians who supported the war, seeing it as a way to remove what they consider a vile regime, may be hoping for.

For many others, the ceasefire offers much needed relief from the death and destruction around them.