GAZA CITY, Palestinian Territories (AFP) - A ceasefire came into effect on Wednesday in and around Gaza after a week of cross-border violence between Israel and Palestinian militants that killed at least 160 people.
Gaza City's streets were dark and deserted in the minutes after the truce began at 1900 GMT (3am Singapore time), but soon after people poured out of their homes to hail the "victory" as the ceasefire appeared to hold.
Heavy celebratory gunfire could be heard throughout the Gaza Strip, and residents also released fireworks into the night sky, where Israeli drones still buzzed overhead.
"The resistance has triumphed," some shouted, alongside chants of "Allahu akbar (God is greatest)." Foreign Minister Mohammed Kamel Amr of Egypt, which brokered the ceasefire after marathon talks, announced the cessation of hostilities at a joint news conference in Cairo with United States (US) Secretary of State Hillary Clinton.
The accord, a copy of which was obtained by AFP, calls on Israel to "stop all hostilities... in the land, sea and air including incursions and targeting of individuals" and urges the Palestinian factions to end "rocket attacks and all attacks along the border".
If it holds, within 24 hours, Israel would be required to start implementing procedures to open Gaza's border crossings and allow the movement of people and goods.
"This is a critical moment for the region," Mrs Clinton said. "In the days ahead, the United States will work with partners in the region to consolidate this progress." Nearly 24 hours after a truce had been expected to take hold, and after a day of violence that killed another 18 Palestinians, Israeli Prime Minister Benjamin Netanyahu's office said he was prepared to give peace a chance.
"Netanyahu spoke with (US) President Barack Obama and agreed to his recommendation to give a chance to an Egyptian proposal for a ceasefire and thereby give an opportunity for the stabilisation of the situation and a calming of it," said a statement.
It won him praise from Obama.
"The president commended the prime minister for agreeing to the Egyptian ceasefire proposal, which the president recommended the prime minster do, while reiterating that Israel maintains the right to defend itself," the White House said.
The exiled chief of Hamas, which rules Gaza, said Israel had "failed in all its goals" and thanked Iran for supporting his Islamist movement during the conflict.
"After eight days, God stayed their hand from the people of Gaza, and they were compelled to submit to the conditions of the resistance," Mr Khaled Meshaal said in Cairo.
The agreement came after a day of shuttle diplomacy led by Clinton and United Nations (UN) Secretary General Ban Ki Moon, who said that details of the deal still needed to be ironed out.
"There are still many details to be solidified for a durable ceasefire. I hope they will finalise these details as soon possible," he said in Amman, Jordan.
Truce hopes appeared faint just hours before as a blast tore through a bus in Tel Aviv, and Israel hit back with deadly raids on Gaza City and elsewhere in the coastal Palestinian territory.
The blast, which injured 17 people, occurred close to the Israeli defence ministry and was quickly denounced by Netanyahu's spokesman, who tweeted: "This was a terrorist attack".
The bus windows were blown out and its seats contorted, in scenes reminiscent of the second Palestinian intifada.
"I am speechless. This is scary," said Ms Sigalit, a 22-year-old waitress working nearby.
Condemnation poured in, with Washington branding it "outrageous", Moscow denouncing it as a "criminal", and France and Germany calling for an urgent and lasting ceasefire in Gaza.
Soon after, another six Palestinians were killed in air strikes on Gaza City.
One of the strikes hit the tower housing AFP's offices for the second time in less than 24 hours, killing a toddler in another building, Hamas said. No AFP journalists were inside.
Another strike shortly afterwards on central Gaza killed a four-year-old girl, medics said.
Israel launched its offensive on November 14 with the targeted killing of a Hamas military chief. It has since hit more than 1,500 targets.
Gaza militants fired more than 1,500 rockets back at Israel, whose vaunted Iron Dome anti-missile system intercepted more than 420 of them.
At least 155 Palestinians have been killed in the conflict, and five Israelis have died.
The conflict came as Israel heads towards a general election in January, and raised the spectre of a broader military campaign along the lines of the Jewish state's devastating 22-day operation launched at the end of December 2008.