NEW DELHI - Hours past midnight Thursday, U.S. Secretary of State John Kerry was still working the phones, trying to come up with a cease-fire plan to stop the bloodshed in the Gaza Strip. He'd 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, Kerry issued a statement and called a 3:30 a.m. Friday 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 U.N. headquarters in New York and in New Delhi, where Kerry was meeting with India 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 July 8.
Aides said Kerry made more than 100 calls over the last 10 days, including several dozen on Thursday 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 Friday with an air of weariness, and solemnity, rather than declaring victory.
"This is not a time for congratulations and joy, or anything except a serious determination, a focus, by everybody to try to figure out the road ahead," Kerry told a half-dozen reporters who were hastily summoned to his hotel suite only 45 minutes after the deal was struck. "This is a respite. It's a moment of opportunity, not an end; it's not a solution. It's the opportunity to find the solution."
U.N. spokesman Stephane Dujarric said the cease-fire 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 U.N. special coordinator for the Middle East peace process.
Kerry and Serry shepherded a cease-fire that begins at 8 a.m. local time Friday 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 Friday, 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 make repairs to water and energy systems.
Israeli and Palestinian delegations were expected to travel immediately to Cairo for talks moderated by the Egyptian government. It's not clear which other nations will be attending the talks, and aides to Kerry said Egypt will ultimately decide who will participate.
It is, however, expected that members of Hamas will be part of the Palestinian delegation named by Palestinian President Mahmoud Abbas - although Egypt will have to serve as a go-between for the militants and Israel. Both the U.S. and Israel consider Hamas a terrorist organization and will not directly deal with the militant group.
Over the last several weeks, diplomats from Qatar and Turkey have served as intermediators between the U.S. and Hamas in a role that State Department officials described as key in securing an agreement. Qatar, Turkey and Hamas all have ties to the Muslim Brotherhood, an Islamist political organization that has been outlawed in Egypt following last year's ouster in Cairo of former President Mohammed Morsi and his Brotherhood-led government.
The U.S. will be represented in Cairo by Frank Lowenstein, the State Department's top envoy to the Mideast.
After falling short of winning a truce last week, 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 U.S. 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 cease-fire.
"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," Kerry told reporters earlier in the day, at the start of a press conference with 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's 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's no guarantee that the truce will hold once the 72 hours are up, on Monday morning in the Mideast.
The U.S. also has proposed a rolling set of short-term cease-fire agreements to keep the negotiations going, but it's 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," 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," Kerry said.
"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," he said.