Iran and the US have agreed to a conditional two-week ceasefire, during which shipping traffic will be allowed through the Strait of Hormuz.

This comes more than a month after the US and Israel launched co-ordinated attacks on Iran, and hours after US President Donald Trump threatened "a whole civilisation will die tonight" if Iran did not reopen the Strait.

Pakistan's Prime Minister Shehbaz Sharif, who has been mediating negotiations, said early on Wednesday that the ceasefire was effective immediately.

Here's what we know so far about the deal.

What have the US and Iran each said?

Trump said he'd agreed to "suspend the bombing and attack of Iran for a period of two weeks" if Tehran agrees to reopen the Strait of Hormuz, a vital shipping route for oil and other exports from the Gulf.

In a post on Truth Social, Trump said he agreed to the provisional ceasefire because "we have already met and exceeded all Military objectives".

This comes after he earlier warned the US could take Iran out "in one night" and that a "whole civilisation will die tonight, never to be brought back again" - threats that drew condemnation from the United Nations chief and the Pope.

Iran agreed to allow vessels through the Hormuz Strait for two weeks, with their passage co-ordinated by the Iranian military.

The country has also issued a 10-point plan, which includes, among other things, the complete cessation of war in Iran, Iraq, Lebanon and Yemen; "full commitment" to lifting sanctions on Iran; the release of Iranian funds and frozen assets held by the US; and a "full payment of compensation for reconstruction costs" to Iran.

It also says, "Iran fully commits to not seeking possession of any nuclear weapons".

"Iran's victory in the field would also be consolidated in political negotiations," Tehran's Supreme National Security Council said in a statement.

According to Sharif, the ceasefire will also take effect in Lebanon, where Israel says it has been fighting the Iran-backed militant group Hezbollah.

Israel's leadership has been stating they will not leave Lebanon until the threat from Hezbollah has been removed.

There is no indication from Israel that it has agreed to halt its operations in Lebanon, or elsewhere.