US President Donald Trump and Iran's President Masoud Pezeshkian signed a deal Wednesday meant to end the Middle East war, with Tehran agreeing to dilute its enriched uranium in return for large-scale economic relief and a $300 billion reconstruction fund backed by nations across the region. Trump put his signature to the memorandum of understanding during a candlelit dinner at the Palace of Versailles following a G7 summit, as host French President Emmanuel Macron and other guests applauded, a video posted by a Trump aide showed. "Just signed it," Trump told reporters as he emerged from the palace. Read moreDiluting uranium, oil sales: What's in the draft US-Iran deal? Iranian Foreign Ministry spokesman Esmaeil Baghaei, quoted by the state news agency IRNA, said the document "was finalised with the signatures of the presidents". Prime Minister Shehbaz Sharif of Pakistan, which mediated the agreement, said on X that it "shall enter into force with immediate effect". The deal aims to draw a line under the war launched February 28 by the United States and Israel, prompting Iran to counterattack with missile and drone salvos across the region – and effectively shutting down the Strait of Hormuz, a crucial waterway for the world economy. The US responded by blocking shipping to and from Iranian ports. The war has killed more than 7,000 people across the Middle East, most of them in Iran and Lebanon. "As a first step, Islamic Republic of Iran will instantly reopen the Strait of Hormuz and the United States of America will immediately lift the naval blockade," Sharif wrote. Under the text, Washington also commits to immediately waive oil sanctions crippling Iran's economy. And once a final agreement is reached on the Islamic Republic's nuclear programme, the United States will also facilitate the release of a $300 billion reconstruction fund supported by regional nations, the deal says. The agreement had earlier been slated for signatures by Iran's chief negotiator and parliament speaker, Mohammad Bagher Ghalibaf, and US Vice President JD Vance. Iran said an in-person ceremony was no longer needed. But Sharif said an official ceremony will take place Friday in Switzerland and technical talks will commence. 'Great victory' for Iran Iran said the deal represented a US "failure". "People will see it and judge," Ghalibaf said on state television late Wednesday, after the text was released. Highlighting the global impact of any deal, China said Wednesday that its top diplomat had impressed on Tehran that it was "key" for all sides to "genuinely implement" their commitments. But Trump's decision to pull the plug on the war, in which 13 US service members were killed and vast amounts of US ammunition stockpiles were used up, has unsettled some of his own allies at home. The agreement is only a temporary arrangement meant to give time for starting detailed negotiations on the far more complex issue of long-term control over Iran's nuclear power programme, which Washington has long alleged serves as a cover for Tehran's ambitions to develop nuclear weapons. Iran has always maintained its nuclear programme is for civilian energy purposes, enriching uranium to a purity that falls just shy of weapons-grade.