How 100-call Kerry nailed ceasefire
John Kerry was burning midnight oil, still working the phones, trying to come up with a ceasefire plan to stop the bloodshed in the Gaza Strip.
He had been pushing for a deal all day - in fact, for more than a week - and nailing down a final agreement was proving elusive.
Finally, less than an hour after all sides signed off on the precise and technical wording for a 72-hour truce, the US secretary of state issued a statement and called a 3.30am New Delhi time press conference to seal the deal before any party could back out.
It was the kind of announcement that ricocheted around the world: announced simultaneously at United Nations headquarters in New York and in New Delhi, where Mr Kerry was meeting Indian officials; drawing in regional players from Turkey to Egypt to Qatar; and finally converging on the tiny strip of land on the Mediterranean Sea where Israel and the Palestinian militant group Hamas have fought an all-out war in the last three weeks.
More than 1,400 Palestinians and nearly 60 Israelis have been killed since the fighting began on July 8.
Aides said Mr Kerry made more than 100 calls over the last 10 days, including several dozen yesterday alone, to broker the agreement that he failed to reach a week ago in Cairo to much ridicule and indignation from Israelis who accused him of going soft on Hamas.
He announced the deal in the middle of the night with an air of weariness, and solemnity, rather than declaring victory.
UN spokesman Stephane Dujarric said the ceasefire announcement was the result of secretary general Ban Ki-moon's trip recent trip to the region as well as 48 hours of "extremely active diplomacy at all levels" - including Robert Serry, the UN special coordinator for the Middle East peace process.
Mr Kerry and Mr Serry shepherded a ceasefire beginning at 8am local time (6am BST) in Gaza and Israel. Negotiations over the underlying disputes between Israel and Hamas - including tunnels into Israel and easing border restrictions for Palestinians - will begin immediately in Cairo, potentially as early as today, or as soon as delegations can get there.
Both Israel and Hamas have agreed to end all aggressive operations and conduct only defensive missions to protect their people. For Israel, that means troops on the ground in Gaza can continue to destroy the tunnels - but only those that are behind their defensive lines and lead into Israel.
At the same time, Palestinians in Gaza will be able to receive food, medicine and humanitarian assistance, bury their dead, treat the wounded and travel to their homes. The time also will be used to repair water and energy systems.
Over the last several weeks, diplomats from Qatar and Turkey have served as intermediators between the US and Hamas in a role US State Department officials described as key in securing an agreement. Qatar,
Turkey and Hamas all have ties to the Muslim Brotherhood, an Islamist political organisation that has been outlawed in Egypt following last year's removal in Cairo of former president Mohammed Morsi and his Brotherhood-led government.
The US will be represented in Cairo by Frank Lowenstein, the State Department's top envoy to the Middle East.
After falling short of winning a truce last week, Mr Kerry left Cairo disappointed and, officials have said, angry - but quietly soldiered on.
His efforts peaked during a 36-hour visit to New Delhi, where he was seeking to foster warmer diplomatic relations between the US and India after years of strain. At least at one point during the day, he interrupted meetings with Indian foreign minister Sushma Swaraj to take calls about the potential ceasefire.
"The minister was extremely generous in permitting me to make a number of must-do phone calls during our session, and I'm very grateful to her for her indulgence," Mr Kerry told reporters earlier in the day, at the start of a press conference with Ms Swaraj.
Every time it looked like an agreement was near, State Department officials said one of the sides would tweak the language - setting the negotiations back into motion.
It is hoped that the 72 hours will be long enough to get the talks started, but not long enough to draw a rejection from any side that might have opposed a longer-term truce proposal. Even so, there is no guarantee that the ceasefire will hold once the 72 hours are up, on Monday morning.
The US has also has proposed a rolling set of short-term ceasefire agreements to keep the negotiations going, but it is not clear that the parties will agree to that.
"We hope that this moment of opportunity will be grabbed by the parties, but no one can force them to do that, obviously," Mr Kerry said in New Delhi, in the darkest part of the night.
"So we come at it with sober reflection about the lives lost and the violence suffered.
"There's been too much of it for most people's judgment here, and our hope is that reason could possibly prevail to find the road forward."