JERUSALEM (AP) - Israel declared a unilateral cease-fire Saturday in its 22-day offensive that turned Gaza neighborhoods into battlegrounds and dealt a stinging blow to the Islamic militants of Hamas. But Israeli troops will stay in the Palestinian territory for now and Hamas threatened to keep fighting until they leave.
In announcing the cease-fire, Prime Minister Ehud Olmert said Israel had achieved its goals, and more.
"Hamas was hit hard, in its military arms and in its government institutions," Olmert said.
Israel launched the offensive on Dec. 27 to stop years of rocket fire from Gaza at southern Israeli towns. But the rockets did not stop coming throughout the assault. Militants fired about 30 rockets into Israel on Saturday, eight of them around the time Olmert spoke.
More than 1,100 Palestinians have been killed in the offensive, according to Palestinian and U.N. officials. At least 13 Israelis have also died.
Olmert said the campaign will stop at 2 a.m. local time (7 p.m. EST).
"If Hamas holds its fire, the military "will weigh pulling out of Gaza at a time that befits us," Olmert said. If not, Israel "will continue to act to defend our residents."
In the hours leading up to the vote by the 12-member Security Cabinet, and even as they met, Israel kept bombarding Gaza.
Earlier Saturday in the northern town of Beit Lahiya, Israeli shells struck a U.N. school where 1,600 people had sought shelter. One shell scored a direct hit on the top floor of the three-story building, killing two boys, U.N. officials said.
Israel's insistence on keeping troops in Gaza raises the specter of a stalemate with Hamas, which has repeated that it will not respect any cease-fire until Israel pulls out of the territory.
Foreign Minister Tzipi Livni indicated that Israel would renew its offensive if Hamas militants continued to fire rockets at Israel.
"This campaign is not a one-time event," she said in an interview with the Israeli YNet news Web site. "The test will be the day after. That is the test of deterrence."
Hamas spokesman Fawzi Barhoum in Gaza said a unilateral cease-fire was not enough to end Hamas' resistance - echoing the stance taken earlier by Hamas leaders in exile.
"The occupier must halt his fire immediately and withdraw from our land and lift his blockade and open all crossings and we will not accept any one Zionist soldier on our land, regardless of the price that it costs," Barhoum said.
Palestinians reacted with skepticism and called on world leaders attending a summit planned for Sunday in Egypt to put pressure on Israel to withdraw immediately.
"We had hoped that the Israeli announcement would be matched by total cessation of hostilities and the immediate withdrawal of Israeli forces from Gaza," said Saeb Erekat, a top aide to Palestinian President Mahmoud Abbas, a Hamas rival. "I am afraid that the presence of the Israeli forces in Gaza means that the cease fire will not stand and will so fragile."
The summit in Egypt is meant to give international backing to the cease-fire will. Leaders of Germany, France, Spain, Britain, Italy, Turkey and the Czech Republic - which holds the rotating EU presidency - are expected to attend along with Palestinian President Mahmoud Abbas, Egyptian President Hosni Mubarak and U.N. chief Ban.
It was not immediately clear whether Israel would send a representative, and Hamas has not been invited.
Israel's key demand is for guarantees that Hamas halt the smuggling of rockets, explosives and other weapons through the porous Egyptian border.
Under the deal, Egypt would shut down weapons smuggling routes with international help and discussions on opening Gaza's blockaded border crossings - Hamas' key demand - would take place at a later date.
Israeli strikes on Gaza kept up even after the Cabinet meeting began. Walls shook and windows trembled in the southern Gaza border town of Rafah as fighter jets soared above head, apparently focusing their missiles on the no-man's land with Egypt where many suspected smuggling tunnels lie.
A total of 13 Palestinians were killed in battles throughout Gaza Saturday, Palestinian medics said.
John Ging, the top U.N. official in Gaza, condemned the attack on Beit Lahiya that killed the two boys - the latest in a series of Israeli shellings that have struck U.N. installations.
"The question that has to be asked is for all those children and all those innocent people who have been killed in this conflict. Were they war crimes? Were they war crimes that resulted in the deaths of the innocents during this conflict? That question has to be answered," he said.
The Israeli army said it was launching a high-level investigation into the shelling, as well as four other attacks that hit civilian targets, including the U.N. headquarters in Gaza. The army investigation also includes the shelling of a hospital, a media center and the home of a well-known doctor.
Ibrahim Barzak reported from Gaza. Associated Press reporter
Alfred de Montesquiou contributed to this report from Rafah, Gaza
(Copyright 2009 by The Associated Press. All Rights Reserved.)