The accord, set to go into effect at 6 a.m. Thursday (11 p.m. EDT Wednesday), has the bigger aim of ending Israel's yearlong economic blockade of Gaza and bringing home a captive Israeli soldier.
But the phased approach is prone to pitfalls, and past truces have quickly broken down. Israel cautiously promised a "new reality" if the rocket fire ends.
The announcement capped months of Egyptian-brokered negotiations that have been repeatedly marred by violence. The deal was first announced in Cairo by Egypt's state-run news agency and quickly confirmed by Hamas. However, Hamas said it would respond to any Israeli attacks.
Underscoring the fragile situation, Israeli aircraft attacked three targets in southern Gaza, killing six Palestinian militants, Gaza medical officials said. In response, Palestinian militants fired seven rockets into Israel, the Israeli military said.
Still, after months of fighting, both sides seemed interested in a period of calm.
Israel wants to halt the incessant rocket and mortar attacks on its southern communities that have killed seven Israelis over the past year. Israeli reprisals have killed more than 400 Palestinians, many of them civilians, according to an Associated Press tally based on figures from hospital officials.
Israel also wants an end to Hamas arms smuggling into Gaza from Egypt, and the return of Cpl. Gilad Schalit, the Israeli soldier captured by Hamas-linked militants in a cross-border raid two years ago.
Hamas wants Israel to lift its crippling blockade of Gaza, which has led to widespread shortages of fuel, electricity and basic goods. Israeli imposed the sanctions after Hamas violently seized control of Gaza last year, and has tightened the blockade recently in response to increased rocket fire.
Gaza Hamas leader Mahmoud Zahar said all the armed factions in Gaza are on board with the truce. Speaking after another Hamas official outlined details of the truce at a news conference, Zahar said Hamas will not put down its weapons, because he did not believe Israel would implement the cease-fire. "We don't trust them, but let's see," he said.
Israeli Defense Minister Ehud Barak said Tuesday that no deal was in place yet. "It is too soon to announce a truce, and even when it begins, if it does, it is hard to evaluate how long it would last," he said, adding, "The Israeli military is ready for any development."
Past informal cease-fires with Hamas, most recently in November 2006, lasted only for several weeks. They were never formally signed because Hamas and Israel do not recognize each other. Israel and the Palestinians declared a truce in February 2005. Hamas, which killed scores of Israelis in suicide bombings, largely abided by the cease-fire until June 2006.
Palestinian President Mahmoud Abbas, a rival of Hamas, welcomed the accord. "President Abbas considers the (truce) as a national interest for our people," said a statement from his West Bank office.
In Washington, the State Department said it was supportive of efforts to bring calm to Gaza and southern Israel while insisting that Hamas remained a terrorist organization.
"We believe that establishing calm in Gaza and elsewhere is a good thing and we're supportive of Egyptian efforts and other efforts to achieve this," deputy spokesman Tom Casey said.
"But saying you have a loaded gun to my head but you are not going to fire it today is far different than taking the gun down, locking it up and saying you're not going to use it again," he said. "Even if this is in fact a true report, it hardly takes Hamas out of the terrorism business."
The state-run Egyptian news agency MENA cited an unidentified high-level Egyptian official as saying a "mutual and simultaneous calm" would take effect Thursday. It described the calm as the "first phase" of a wider deal.
Egyptian, Israeli and Hamas officials all said the talks would quickly move to the larger issues of the blockade and Schalit, the captive soldier.
An Egyptian official told The Associated Press that after three days, Israel would begin to open Gaza's border crossings to let more supplies into the area. A week later, he said, Israel planned to allow in additional goods.
In a final phase, the official said, Israel would consider approval of the reopening of Gaza's Rafah border crossing with Egypt. He said the idea is for the truce to last six months.
The Rafah crossing, the main gateway for Gaza's 1.4 million people to travel abroad, has been sealed since the Hamas takeover of Gaza. The closure has prevented people from traveling for medical care, studies and family visits.
In January, Hamas blew up the border wall between Egypt and Gaza, allowing people to move in and out of Egypt for nearly two weeks before it was resealed.
A Hamas official said the issues of Rafah and Schalit would be linked, and he expected talks to begin within days. Israeli defense officials said they expected negotiations on Schalit to begin Sunday.
The officials all spoke on condition of anonymity, because they were not permitted to speak for the record with the information.
Israeli government spokesman Mark Regev would not confirm a deal, but voiced hope for its success.
"If there is a total absence of terror attacks from Gaza into Israel, and if there is an end to arms buildup in Gaza Strip and movement on the hostage Gilad Schalit, that will indeed be a new reality," he said.
Many obstacles threaten the latest deal.
Israel is suspicious of Hamas' motives since the group has said it wants to use the lull to rearm. And negotiations on Schalit are sure to be complicated. Israel has balked at Hamas demands that it release hundreds of Palestinian prisoners, including people convicted in the deaths of Israelis, in exchange for him.
There is also the constant threat of an outbreak in violence, as Tuesday's fighting demonstrated. Gaza's landscape includes Islamic Jihad and other tiny armed groups that sometimes act independently of Hamas.
For now, Hamas appears to be relying on calls for Palestinian unity to maintain the truce. It made sure to include Islamic Jihad in the consultations with Egypt. On Tuesday, Islamic Jihad said it would honor the agreement as long as Israel didn't attack.
An improvement in living conditions in Gaza could also strengthen the calm. Gaza is suffering from dire shortages of fuel, cement and other basic goods. If residents feel relief, it is likely to build public support for the quiet.
Iranian-backed Gaza militants have been bombarding southern Israel with rockets and mortars for seven years. The rate of fire increased after Israel pulled its troops and settlers out of Gaza in 2005 and was stepped up further last year after Hamas wrested power from forces loyal to Abbas.