Israel and Hamas agreed to a three-day cease-fire in the Gaza conflict with the hope of forging a more lasting peace.

U.S. Secretary of State
John Kerry
and U.N. Secretary-General Ban Ki-moon announced the truce, set to begin Friday morning, in a joint statement issued in New Delhi.

A spokesman for Hamas, the Islamist group that rules Gaza, confirmed that all militant factions in the Palestinian territory had agreed to suspend violence. Israeli Prime Minister
Benjamin Netanyahu's
office confirmed the agreement.

Israel, Hamas and other Palestinian factions would travel to Cairo immediately for negotiations aimed at building the cease-fire into a more lasting truce, the U.S. and U.N. said.

During the pause, Israel won't pull back its forces inside Gaza.

"We urge all parties to act with restraint until this humanitarian cease-fire begins, and to fully abide by their commitments during the cease-fire," the joint statement said.

The truce will be used to deliver urgently needed humanitarian supplies to Gaza residents, and to allow for the burial of those killed and to tend to the wounded. Other aid agencies will work to repair water and energy infrastructure that has been damaged or destroyed.

"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," Mr. Kerry told reporters.

Israel, Hamas and other Palestinian factions made commitments to abide by the unconditional truce to the U.N.'s special Middle East coordinator,
Robert Serry,
Messrs. Kerry and Ban said.

Mr. Kerry and other U.S. officials have said they hope to build on this initial pause to open a dialogue on the future of Gaza, an impoverished coastal strip with 1.8 million people.

Both sides have voiced openness to a durable cease-fire, but international mediators have made little progress trying to bridge the gap between them. Hamas is demanding an immediate end to the economic blockade of Gaza by Israel and Egypt. Israel wants all Palestinian militant groups disarmed and Gaza demilitarized.

Israel called up 16,000 reservists on Thursday; 70,000 had previously been called. Above, Israeli soldiers rested.
European Pressphoto Agency

Osama Hamdan,
a Hamas leader in Qatar, told Al Jazeera the truce would only be for humanitarian purposes for now, but that Hamas was open for a discussion of a longer "political cease-fire."

"All the Palestinian groups have agreed to a humanitarian cease-fire, but if Israel violates it, then retaliation will be immediate," he said. "There is no doubt that this humanitarian cease-fire will serve the Palestinian people, but our goal is to end the Israeli aggression and end the siege," he said of the blockade. "As long as the goals of resistance groups are not achieved, the resistance will continue."

Izzat Al Rashq,
a Hamas spokesman, said a delegation from Hamas and Islamic Jihad, a smaller Palestinian militant faction, would leave to Egypt to join a Palestinian delegation there.

Israeli forces struck the Gaza Strip's only power plant Tuesday in their heaviest bombardment of a three-week offensive in Gaza. Photo: Getty Images.

In forging the truce, Messrs. Kerry and Ban needed to rely heavily on Qatar and Turkey. U.S. and Palestinian officials said Mr. Kerry was constantly on the phone Thursday with Qatari Foreign Minister
Khalid al-Attiya
in Doha, who was in turn communicating directly with Hamas chief
Khaled Meshaal.

Top aides to Palestinian President
Mahmoud Abbas
were also in Qatar having hours of talks with Meshaal, highlighting the centrality of Doha's government to the cease-fire.

Hours before the truce was announced, Mr. Netanyahu said his military was making gains in plugging up Hamas's underground tunnel network and would continue the operation "with or without a cease-fire."

Israel called up 16,000 reservists Thursday in addition to 70,000 who had previously been called.

In Gaza, fighting raged for a 24th day. Militants fired 99 rockets toward Israel, the Israeli military said, and a mortar attack hit an army staging area near the border, wounding several soldiers. Israeli strikes hit about 100 targets in Gaza, it said.

Two senior U.N. officials portrayed a dire humanitarian emergency with 220,000 displaced in U.N. shelters. Thirty-one people have been killed in strikes on two shelters, Gaza's health ministry said.

"The reality of Gaza today is that no place is safe,"
Valerie Amos,
the U.N. humanitarian affairs chief, told the U.N. Security Council.

Gaza's health ministry said 1,428 Palestinians have been killed since the conflict began on July 8. Ms. Amos said more than 80% were civilians.

Fifty-six Israeli soldiers have been killed, according to the military, and three civilians have been killed by rockets fired into Israel.

The number of displaced in Gaza is four times higher than the peak in Israel's conflict with Hamas in 2008-09, according to
Pierre Krahenbuhl,
head of the U.N. agency that aids Palestinian refugees.

An Israeli soldier carries a shell as he and other soldiers prepare tanks stationed along the border between Israel and the Gaza Strip.
Agence France-Presse/Getty Images

The Pentagon urged Israel's military to take steps to reduce civilian casualties, echoing criticism by the White House and the State Department, even as it allowed the military to tap an Israel-based ammunition stockpile to replace 120 mm tank rounds and 40 mm illumination rounds.

Israel has rebuffed criticism of its operation, blaming Hamas for shielding fighters and weapons in heavily populated civilian areas or near hospitals and mosques.

Israel has sent a delegation to Egypt, which has been trying, with U.S. support, to modify a cease-fire proposal that Israel rejected a week ago. Mr. Netanyahu's remarks Thursday appeared to spell out a new Israeli condition—that its forces be allowed to root out tunnels under a permanent cease-fire agreement.

"I won't agree to any proposal that won't enable the Israeli military to finish this important task for the sake of Israel's security," he said.

A senior Israeli military officer said Israeli forces uncovered 31 tunnels built by Hamas with the aim of reaching Israel, including 11 that had reached under the border. He said the "vast majority" had been destroyed but declined to say how long it would take to finish the job.

Related Video: As the conflict between Israel and Palestinians in Gaza escalates, many Israelis are turning to technology. The popular Red Alert: Israel app provides users with up-to-the-minute information on rocket attacks from Gaza.

A second Israeli official said Hamas's arsenal, estimated more than 10,000 rockets at the start of the conflict, has dwindled to 3,000 to 4,000 as Gaza militants have fired thousands into Israel and the military has destroyed thousands more in Gaza.

"The question for us is…what do we do to ensure that the 3,000 doesn't jump to 30,000 in a year," the official said. "We don't want to go through a door where Hamas is stronger."

To that end, he said, Israel is pushing to create an Israeli-Egyptian inspection mechanism to ensure that supplies entering Gaza can't be used by Hamas to rebuild its arsenal and tunnels.

State Department officials said Mr. Kerry knew they had a deal an hour before it was announced and said it followed more than 100 phone calls in last week, including dozens on Thursday, which interrupted Mr. Kerry's talks with Indian officials.

Officials explained that the cease-fire was considered long enough to get the parties to another country to start negotiations toward a longer truce.

The U.S. plans to send a small delegation to support the talks, which could begin as early as Friday. The negotiations will be led by the Egyptians, because the U.S. and Israel won't sit down at the table with Hamas representatives. Mr. Abbas will choose the Palestinian delegation, which will include Hamas.

—Adam Entous in Washington, Nicholas Casey in Gaza City and Asa Fitch in Jerusalem contributed reporting.