Israel Defense Forces was gradually withdrawing grounds forces from the Gaza Strip on Monday, following a tentative truce with Hamas that allowed Palestinians to take stock of the devastating three-week war.

Troops and tanks that had poured into Gaza on January 3 as part of an offensive to counter Palestinian rocket attacks began pulling out on Sunday evening, though the army said they remained ready to tackle any flare-ups in fighting.

Israeli officials have said that troops would withdraw completely before Barack Obama's inauguration on Tuesday as the new U.S. president. The officials spoke on condition of anonymity because the plan has not been publicly announced.

Government spokesman Mark Regev would not confirm the timetable. He said only that if Gaza remains quiet Israel's departure would be almost immediate.

Israel and Hamas separately declared cease-fires on Sunday, to the relief of Western powers that, while publicly sympathetic to Israel's security concerns, were alarmed by the mounting humanitarian toll in the impoverished territory.

Prime Minister Ehud Olmert said Sunday that Israel does not intend to keep a military presence inside the Gaza Strip, nor does it aim to reconquer the territory, despite its three-week offensive on the Hamas-ruled coastal enclave.

He told European leaders visiting Jerusalem on Sunday evening that in the wake of the cease-fire, Israel planned to withdraw all of its troops as soon as possible. He said that such a move would come when the situation between Israel and Gaza was "stable."

"We didn't set out to conquer Gaza, we didn't set out to control Gaza, we don't want to remain in Gaza and we intend on leaving Gaza as fast as possible", Olmert said at a dinner with the leaders of Britain, France, Germany, Spain, Italy and the Czech Republic.

The crisis in Gaza has clouded the last days of the Bush administration and spelled Middle East challenges that U.S. President-elect Barack Obama, who is to be sworn in on Tuesday, may find no less insurmountable than those faced by his predecessors.

As Palestinians emerged from hiding, agape at the killing of more than 1,300 fellow Gazans and at the widespread destruction of homes and government infrastructure, the head of the Hamas administration claimed a "popular victory" against Israel.

"The enemy has failed to achieve its goals," Ismail Haniyeh said in a speech.

Hamas's truce decision, conditioned on Israel withdrawing within a week, was "wise and responsible," he said.

Israel launched its air, ground and sea assault on December 27 vowing to "change the reality" for southern border towns that, since 2001, had taken fire from Hamas and other Palestinian factions armed with rockets.

Though some 20 rockets struck the Negev on Sunday amid truce declarations, Prime Minister Ehud Olmert declared the mission accomplished - noting a flurry of diplomatic efforts by the United States, Egypt and European countries to prevent Hamas rearming.

That would mean as yet unspecified measures to stop Hamas smuggling weapons across the Egypt-Gaza frontier, a sensitive matter given Cairo's past efforts to play down its scope.

Public Security Minister Avi Dichter threatened a military response to any renewed flow of arms into the Gaza Strip, saying Israel would view such smuggling as an attack on its territory.

"That means, if smuggling is renewed, Israel will view it as if it were fired upon," Dichter told Israel Radio.

For now, Gaza's situation looks much as it did before the conflict - armed standoff and a dim future for the 1.5 million people fenced inside the strip by a blockade aimed at punishing Islamist Hamas for rocket fire and ambitions to destroy Israel.

According to the Palestinian Statistics Bureau, some 4,000 residential buildings were reduced to rubble during the conflict. Western diplomats have said it could cost at least $1.6 billion to repair the infrastructure damage in Gaza.

"I don't know what sort of future I have now - only God knows my future after this," said Amani Kurdi, a 19-year-old student, as she surveyed the wreckage of Gaza's Islamic University, where she had studied science.

Hamas officials, during talks with Egyptian mediators, said the faction demanded the opening of all Gaza's border crossings for the entry of materials, food, goods and basic needs.

French President Nicolas Sarkozy - joined on Sunday by leaders of Germany, Britain, Spain, Italy and the Czech Republic as current president of the EU for talks with Olmert - called on Israel to open Gaza's borders to aid as soon as possible.

Olmert said Israel wanted out of Gaza as soon as possible and his spokesman, Mark Regev, said "enormous amounts" of aid could be allowed in if the quiet holds.

Meanwhile, Israel announced on Monday that it would allow 200 trucks carrying humanitarian aid to enter Gaza, Israel Radio reported.

In Israel, which lost 10 troops in combat and three civilians to rocket attacks, the offensive was popular and bolstered the prospects of Foreign Minister Tzipi Livni and Defense Minister Ehud Barak before a Feb. 10 election.

Yet opinion polls still predict an easy win for right-wing opposition leader Benjamin Netanyahu, who had opposed Israel's 2005 withdrawal from Gaza after 38 years, arguing that it would embolden hardline Palestinian Islamists.

Though much of the international community shuns Hamas, it has strong grassroots support and Gaza's suffering threatened to sap the credibility of Western-backed Palestinian President Mahmoud Abbas and his efforts to negotiate peace with Israel.

"The goal remains a durable and fully respected ceasefire that will lead to stabilisation and normali\ation in Gaza," U.S. Secretary of State Condoleezza Rice said.

A spokeswoman for Obama said he welcomed the Gaza truce and would say more about the Gaza situation after he is inaugurated.