GAZA CITY, Gaza (CNN) -- Palestinian militants declared Sunday that they would stop attacks on Israel for a week, a statement that came hours after Israeli Prime Minister Ehud Olmert announced a unilateral cease-fire in the country's assault on Hamas in Gaza.
An Israeli soldier holds up an Israeli flag after leaving Gaza on Sunday.
The Palestinians demanded that Israel remove all troops from Gaza within the week, Hamas spokesman Ayman Taha said from Egypt.
The agreement appears to cover all Palestinian armed factions, not only Hamas.
"We in the Palestinian resistance movements announce a cease-fire in the Gaza Strip," Moussa Abu Marzouk, a senior Hamas official in Syria, said on Syrian TV. "And we demand that Israeli forces withdraw in one week and that they open all the border crossings to permit the entry of humanitarian aid and basic goods for our people in Gaza."
There is no mutual agreement between the Israelis and Palestinians -- each side has made its own unilateral declaration of a cease-fire.
Mahmoud Abbas, the president of the Palestinian Authority, called for the cease-fire to hold so aid could get into Gaza. Watch how a family in Gaza is coping with the violence »
"We hope that it continues and that the situation calms down and that humanitarian aid delivery begins immediately to our people," he said at a summit in Egypt. Watch how a reporter finds Gaza in chaos »
During 22 days of fighting, more than 1,200 people have died, all but 13 of them Palestinians. Watch clean-up efforts in Gaza City »
The Palestinians and Israel continued to skirmish for several hours Sunday after Israel said it was stopping its offensive against Hamas. Palestinians fired at least 19 rockets into Israel on Sunday -- including at least two after the Palestinian cease-fire declaration, according to Israeli police spokesman Mickey Rosenfeld. At least three people were lightly wounded. Israeli military aircraft retaliated, firing missiles and destroying a rocket launcher, a military spokesman said.
Shortly before the rocket attacks, Palestinian gunmen opened fire on Israeli forces in northern Gaza, the military said. Troops returned fire.
Separately, Palestinian medical sources said 23 bodies were pulled from rubble in Gaza. Watch doctors tend to wounded civilians »
Olmert said Sunday the Israeli offensive had achieved its goals but that the Israel Defense Forces reserved the right to respond to any Palestinian violence against Israelis.
"IDF forces are in the Gaza Strip and many other units, which are surrounding Gaza from all sides, are closely observing every corner and listening to every whisper, ready for any response that they might receive from their commanders if and when the violations continue, as they have this morning," he said at the start of the weekly Cabinet meeting, before the announcement of the Palestinian cease-fire.
Israel pulled some troops out of the Palestinian territory as it called a halt to its operation against Hamas, but others remained.
Israeli government spokesman Mark Regev told CNN they would be there for a matter of days, not weeks.
International leaders are in the region for talks on the crisis. Egyptian President Hosni Mubarak and French President Nicolas Sarkozy hosted a summit Sunday in the Red Sea resort of Sharm el-Sheikh, bringing together leaders from Europe and the Middle East.
Olmert told the gathering that, if the cease-fire holds, "the government of Israel has no intention to stay in the Gaza Strip. We are interested in leaving Gaza as soon as we can."
He said Israel would "continue to do whatever is possible to prevent the humanitarian crisis in Gaza," and expressed sorrow for the deaths of innocent civilians. "It wasn't our intention to fight them or to harm them, to hurt them or to shoot at them," he said.
German Premier Angela Merkel underscored the international community's preferred outcome in a news conference in Egypt: "The two-state solution is the only solution we have."
Israeli Prime Minister Ehud Olmert will meet the leaders of the UK, France, Germany, Italy, Spain and the Czech Republic, which holds the rotating presidency of the European Union, later in Jerusalem.
A top aide to Barack Obama said the president-elect would move swiftly to work on the Middle East after he is sworn in on Tuesday.
"The events around the world demand that he act quickly, and I think you'll see him act quickly," David Axelrod told CNN. But he refused to promise Obama would name a Middle East special envoy "on day one."
Israel said it launched the offensive in Gaza to stop the firing of rockets -- primarily the short-range homemade Qassam rockets -- from the territory into southern Israel by Hamas fighters.
"We welcome any alleviation of violence, with cautious optimism and hope that these declarations of cease-fire will lead to the end of fighting," said Charles Clayton, national director of World Vision Jerusalem, an aid group. "We call on all parties to stop attacks, including Hamas' rocket strikes against Israel, and refrain from further hostilities."
He called for "unhindered and safe humanitarian assistance to the desperate civilian families of Gaza who have lost their homes and businesses and are struggling amid shortages of food, supplies, healthcare and fuel."
He further called for an end "to the 18-month blockade of the 1.5 million Palestinians in Gaza," saying it has "devastated the economy, halted services, and rendered the people of Gaza entirely dependent on humanitarian aid."
CNN's Arie Bell and Karl Penhaul contributed to this report.