More difficult negotations set for later in Cairo.
Officials from Hamas and another Gaza-based militant group, Islamic Jihad, said the cease-fire agreement essentially brought Israelis and Palestinians back to terms agreed upon in the truce signed after the 2012 Gaza war.
A senior official in Israeli Prime Minister Benjamin Netanyahu's office, speaking about the latest cease-fire on the condition of anonymity, said Hamas had gained little, if anything, from the conflict, which has left vast tracts of Gaza in ruins.
"Hamas is now finally accepting a cease-fire proposal that was first proposed by Egypt on July 15," the official said. "There is nothing more to the proposal than there was a month and a half ago."
Other demands by the Palestinians - building a seaport and an airport, opening all the border crossings, and improving the movement of goods and people - are set to be discussed later in Cairo. Israel also will press its demand that Gaza be demilitarized.
The cease-fire deal was modest, leaving big questions about who will control the Gaza Strip - Hamas, which runs the enclave and denies Israel's right to exist, or the Palestinian Authority, which is committed to nonviolence and has been unsuccessfully seeking to create a sovereign state in the West Bank and Gaza - to be dealt with later.
U.S. Secretary of State John Kerry welcomed the deal and urged the two sides to "fully and completely comply with its terms."
Kerry also sounded a note of caution, saying in a statement, "We are all aware that this is an opportunity, not a certainty. . . . We are approaching the next phase with our eyes wide open. We have been down this road before and we are all aware of the challenges ahead."
The senior Netanyahu official expressed similar views, saying, "There have been 11 cease-fire attempts that have either been rejected or violated by Hamas, and the key to moving forward and easing the restrictions is honoring cease-fires."
In Gaza City, residents who an hour earlier were hunkered down in their houses listening to rocket and missile fire bounded into the streets after the deal was announced.
There were fireworks and chants, and flags of Hamas and Islamic Jihad were waved while banners celebrated the sacrifice of martyrs.
Even as Hamas leaders started to announce the deal, mortar rounds fired from Gaza killed two Israeli civilians and seriously injured several others on a kibbutz near the border, while Israeli airstrikes claimed eight lives in Gaza.
The conflict has killed about 2,130 Palestinians and 70 Israelis.
Israeli news media reported that the Netanyahu cabinet was split on the decision to accept the cease-fire proposal brokered by Egypt.
The fiercest critic appeared to be the hawkish Economy Minister Naftali Bennett, who, according to the news portal Walla, had requested that Netanyahu bring the proposal to a cabinet vote.
Israeli hard-liners are complaining that the deal did little to guarantee that Hamas would not quickly rearm and begin firing rockets and mortar rounds again.
"The decision to accept the latest cease-fire with Hamas is completely without justification," said Danny Danon, a member of parliament and leader of Netanyahu's Likud party.
Mahmoud Abbas, the leader of the Palestinian Authority, made the cease-fire announcement before the executive panel of the Palestine Liberation Organization in the West Bank city of Ramallah.
"We accept the cease-fire," Abbas said. "It will provide food and construction materials for Gaza," which he described as being in a "disastrous situation, almost unimaginable."
"Later," he said, "we will have more talks."