GAZA CITY, Gaza Strip (AP) -- A cease-fire agreement between Israel and the Gaza Strip's Hamas rulers took effect Wednesday night, bringing an end to eight days of the fiercest fighting in years and possibly signaling a new era of relations between the bitter enemies.
The Egyptian-sponsored deal delivered key achievements for all involved. It promised to halt years of Palestinian rocket attacks on southern Israel and ease border closings that have stifled Gaza's economy, and it affirmed the emergence of Egypt's new Islamist government as a key player in a changing region. But vague language in the agreement and deep hostility between the combatants made it far from certain that the bloodshed would end.
News of the truce, announced in Cairo and reached after furious diplomacy that drew in U.S., U.N., European and regional diplomats, set off ecstatic celebrations in Gaza, where thousands poured into the streets, firing guns into the air, honking horns and waving Palestinian, Hamas and Egyptian flags.
In Israel, small demonstrations were held in communities that were struck by rockets. Protesters said the military should have hit Hamas harder and some held signs demanding security and denouncing "agreements with terrorists."
Leaders on both sides used tough language as they prepared to engage in indirect negotiations on a future border arrangement through Egyptian mediators.
"I know there are citizens that expected a wider military operation and it could be that it will be needed. But at this time the right thing of the state of Israel is to take this opportunity to reach a continuous cease-fire," Israeli Prime Minister Benjamin Netanyahu said.
At a news conference in Cairo, the top Hamas leader in exile, Khaled Mashaal, claimed victory, saying the Israelis "failed in their adventure" and that Israel is "inevitably destined for defeat."
U.S. Secretary of State Hillary Rodham Clinton called it "a critical moment for the region."
"Egypt's new government is assuming the responsibility and leadership that has long made this country a cornerstone of regional stability and peace," Clinton said.
Israel launched its military offensive in Gaza on Nov. 14 in to halt months of renewed rocket fire from Gaza. In a first salvo, it assassinated the Hamas military chief, then bombarded more than 1,500 targets in eight days of airstrikes and artillery attacks. Palestinian militants led by Hamas showered Israel with more than 1,500 rockets, including longer-range weapons that reached as far as Jerusalem and Tel Aviv.
The fighting killed 161 Palestinians, including 71 civilians, and forced hundreds of thousands of people on both sides of the border to remain huddled indoors. Five Israelis were killed. It was the worst bloodshed since an Israeli invasion of Gaza four years ago that left hundreds dead.
Under the agreement, Egypt will play a key role in maintaining the peace. The U.S. also pledged engagement.
"In the days ahead, the United States will work with partners across the region to consolidate this progress, improve conditions for the people of Gaza, and provide security for the people of Israel," Clinton said at a joint news conference in Cairo with her Egyptian counterpart, Mohammed Kamel Amr.
By agreeing to the cease-fire, both Israel and Gaza's Hamas rulers stepped back from the brink of what could have been a full-fledged war. Both had compelling reasons to accept the Egyptian deal, even though its outlines are vague.
Israel, which had massed thousands of troops along the Gaza border, was warned by its Western allies, including the U.S., against launching a ground offensive. Hamas would likely have lost popular support if Gazans had to endure another devastating military invasion.
Hours before the deal was announced, a bomb exploded on a bus in Tel Aviv near Israel's military headquarters, wounding 27 people and raising fears of a breakdown in the diplomacy. The blast, which left the bus charred and its windows blown out, was the first bombing in Tel Aviv since 2006. The bomb was placed inside the bus by a man who got off, said Yitzhak Aharonovich, Israel's minister of internal security. It was not immediately clear who was behind the attack.
The deal calls for an immediate halt to "all hostilities," and after a 24-hour period of calm, talks will open on border arrangements. Gaza's Rafah border crossing with Egypt is expected to assume a central role in the talks. Largely limited to foot traffic, Hamas hopes to turn the crossing into a bustling trade zone.
The new negotiations will try to tackle some difficult issues. Israel will be seeking guarantees for a halt in weapons smuggling by Hamas. The Islamists want unrestricted movement and trade in and out of Gaza.