CAIRO (AP) -- Israel and the Hamas militant group reached a cease-fire agreement Wednesday to end eight days of the fiercest fighting in nearly four years, promising to halt attacks on each other and ease an Israeli blockade constricting the Gaza Strip.
The deal was brokered by the new Islamist government of Egypt, solidifying its role as a leader in the quickly shifting Middle East. Under the agreement, Egypt will play a key role in maintaining the peace.
Egypt's foreign minister, Mohammed Kamel Amr, said the deal was set to take effect at 9 p.m. local time. (2 p.m. EDT), capping days of intense efforts that drew the world's top diplomats into the fray. U.S. Secretary of State Hillary Rodham Clinton stood next to Amr as he announced the breakthrough at a news conference in Cairo.
The agreement will "improve conditions for the people of Gaza and provide security for the people of Israel," Clinton said.
In Israel, Prime Minister Benjamin Netanyahu's office said he agreed to the cease-fire after consulting with President Barack Obama.
Israel launched the fierce Israeli offensive in Gaza on Nov. 14 to stop months of intensifying rocket attacks. Even after the deal was announced, air raid sirens continued to wail in southern Israel.
In the last-minute burst of fire, Palestinian militants fired several bursts of rockets, Israeli authorities said. One rocket hit a house in the southern city of Beersheba, police said. No injuries were reported.
Israel launched well over 1,500 airstrikes and other attacks on targets in Gaza, while more than 1,000 rockets pounded Israel. In all, more than 140 Palestinians, including dozens of civilians, were killed, while five Israelis died in the fighting.
According to a copy of the agreement obtained by The Associated Press, Israel and all Palestinian militant groups agreed to halt "all hostilities." For the Palestinians, that means an end to Israeli airstrikes and assassinations of wanted militants. For Israel, it brings a halt to rocket fire and attempts at cross-border incursions from Gaza.
After a 24-hour cooling off period, it calls for "opening the crossings and facilitating the movement of people and transfer of goods, and refraining from restricting residents free movement."
Hamas officials said details on the new border arrangements would have to be negotiated.
Israel imposed its blockade of Gaza after Hamas, a militant group sworn to Israel's destruction, seized control of the territory five years ago. It has gradually eased the closure, but continues to restrict the movement of certain goods through Israeli-controlled crossings. Among the restrictions: a near-complete ban on exports, limited movement of people leaving the territory, and limits on construction materials that Israel says could be used for military use.
The deal was vague on what limits Israel would lift, and whether Gaza's southern passenger terminal on the Egyptian border would be expanded to allow cargo to pass through as well. The deal was also unclear about a key Israeli demand for an end to arms smuggling into Gaza in tunnels underneath the border with Egypt.
Under the agreement, Egypt will play a key role. It said "Egypt shall receive assurances from each party" that they are committed to the deal.
"Each party shall commit itself not to perform any acts that would break this understanding," it adds. "In case of any observations, Egypt -- as the sponsor of this understanding -- shall be informed to follow up."
The deal marked a key victory for Egypt's new Islamist government, which is caught in a balancing act between its allegiance to Hamas and its need to maintain good relations with Israel and the U.S. Hamas is an offshoot of Egypt's ruling Muslim Brotherhood.