Even for Donald Trump, a president who revels in his place at the centre of world events, it was a dramatic moment.
The US Secretary of State Marco Rubio interrupted a televised meeting Trump was chairing in Washington DC on Wednesday. He handed over a message that the President needed to tell the world that they had a deal. Trump told the audience in the room – and millions more who have now seen the video – that he would have to leave.
They're going to need me… he said, interrupting the day's business. I have to go now to try to solve some problems in the Middle East.
Israel and Hamas signed off the first phase of what Donald Trump intends to be a wider agreement after three days of indirect talks in Egypt.
Mediators from Qatar and Egypt went between the Israeli and Palestinian negotiators who were on separate floors of a hotel in the Red Sea resort of Sharm El-Sheikh.
To add heft to the talks, and to keep the pressure on the Israelis, Donald Trump sent his son-in-law Jared Kushner and his envoy Steve Witkoff. The prime minister of Qatar and the intelligence chiefs of Egypt and Turkey were there to do the same job for the Hamas delegation.
The agreement is a major breakthrough. It does not mean the war is over. But for the first time since the Hamas attacks on Israel, there is a realistic chance of ending the horrors of the last two years.
The plan is that a ceasefire will be followed by the release of the remaining Israeli hostages, in return for Palestinian prisoners and detainees. The Israeli military, the IDF, will pull back from its current positions, leaving it in 53% of Gaza according to the government spokesperson. Israel will lift enough of its restrictions on humanitarian aid entering Gaza to allow in 400 lorry loads a day, which would be distributed by the UN and other agencies.
The controversial Gaza Humanitarian Foundation, the discredited system which Israel wanted to replace the UN, is not mentioned in Donald Trump's 20-point plan.
The deal is a big step, but more need to be taken to get to the war's end. Trump's plan is a framework, with the details left to be negotiated. Serious obstacles lie ahead.
Hamas wants Israel out of the Gaza Strip. Israel's prime minister Benjamin Netanyahu says that will not happen. Hamas is prepared to give up heavy weapons but wants to keep some armaments. Netanyahu wants the complete demilitarisation of Gaza.
He has defined victory for Israel as more than simply the return of the hostages. He has said many times that Hamas must be destroyed, with no chance of regenerating itself in Gaza as a danger to Israelis.
One major question is whether Benjamin Netanyahu will find a way to resume the war after the hostages come home. His ultra-nationalist allies in the cabinet want that to happen. The rich gulf states - that Trump admires and wants to play a big role in a relaunch and redevelopment of Gaza - will keep the pressure on the US president to try to make sure that does not happen.
The breakthrough in Sharm El-Sheikh was greeted by celebrations in Israel and inside the Gaza Strip, bittersweet on both sides after so much loss. In Israel, the families of hostages and their supporters have been waging a constant campaign of pressure and demonstrations to get their people out of Gaza.
Palestinians celebrated in the ruins of Gaza. In return for the hostages, Israel has agreed to free 250 prisoners serving life sentences and 1,700 detainees who have been taken by the IDF from Gaza in the last two years.
Palestinians will welcome them as heroes.