Hamas today announced an immediate ceasefire by its fighters and allied groups in the Gaza Strip, hours after Israel unilaterally declared a truce.

The Israeli army said a short time later it had begun withdrawing its troops from the territory after calling a halt to its three-week offensive, which claimed the lives of about 1,200 Palestinians, a third of them children and young people.

Israel would not say how many troops it was pulling out. Israel's Channel 10 TV showed tanks on the move and infantry soldiers walking towards the border.

Israel announced a unilateral ceasefire late on Saturday. It said it would keep at least some troops in Gaza while arrangements are made to prevent Hamas from re-arming.

A senior Hamas official, Ayman Taha, told Reuters that its ceasefire was dependent on Israel pulling its troops out of the Palestinian territory within a week.

"Hamas and the factions announce a ceasefire in Gaza starting immediately and give Israel a week to withdraw," Taha said in Cairo, where he was holding talks with Egyptian officials.

Hamas also demanded that Israel open all of the Gaza Strip's border crossings to allow in food and humanitarian aid to meet the "basic needs for our people", he said.

A spokesman for the Israeli prime minister, Ehud Olmert, said: "We'll play this day by day. We'll see how this goes. We want to leave Gaza. We'll do so as soon as we can."

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".

After both sides in the conflict announced ceasefires, world leaders meeting in Egypt today called for a Middle East peace conference to be held in an effort to create a lasting peace between Israel and the Palestinians.

Leaders at today's summit on Gaza, which was taking place at the Red Sea resort of Sharm el-Sheikh, said the conference should be modelled on the one held after the first Gulf War in 1991 in Madrid.

The French president, Nicolas Sarkozy, the co-chairman of the summit, said: "We have to make the most of this situation to put back on the table the idea of a big conference to create a lasting peace."

Speaking en route to the conference, Gordon Brown criticised Israel for using excessive force in its three-week military offensive and demanded that Israel allow humanitarian workers full access to Gaza.

Also at today's summit were the Palestinian president, Mahmoud Abbas, and the Egyptian leader, Hosni Mubarak. Israel did not send a representative and Hamas, shunned internationally as a terrorist organisation, was not invited.

The UN secretary general, Ban Ki-moon, today expressed hope that the ceasefire would last, adding: "Urgent humanitarian access for the people of Gaza is the immediate priority."

Seventeen rockets hit southern Israel after Olmert declared an end to the hostilities at 2am (midnight GMT). Israel responded with two air strikes against launching sites, and medical workers said a Palestinian civilian was killed.

At least three rockets struck southern Israel after Hamas said it was halting attacks, Israeli police said.

A statement issued by Hamas in Syria said Palestinian factions were willing to respond to efforts by Egypt and others to broker an agreement for the "final lifting" of Israel's blockade of the Gaza Strip.

A Palestinian civilian was killed by Israeli forces near the Gazan town of Khan Younis after mortar bombs were fired from the area, medical workers said. He was the first fatality on either side of the frontier since Israel declared its ceasefire last night. In another incident, militants fired small arms at an Israeli infantry patrol, which directed artillery and aircraft to strike back.

Tony Blair, the Middle East envoy, said today the ceasefire would only endure if the peace process was revitalised. He said there would be a renewed attempt to reconcile Hamas and its rival Fatah, which counts Abbas among its leaders.

Israel called the ceasefire after American and European pledges of support to shut down the weapons supply pipeline to Hamas.

In a televison address last night, the Olmert said Hamas's power was diminishing. "The conditions have been created that our aims, as declared, were attained fully, and beyond," he said. "The campaign has proven Israel's power and strengthened its deterrence."

The Israeli prime minister declared that the operation had achieved its primary goals of curbing Hamas rocket fire into Israel and securing Egypt's border with Gaza to end weapons smuggling into the Palestinian enclave.

Olmert said Israel did not hate Gazans but had launched the assault in order to protect Israeli children. "We feel the pain of every Palestinian child," he said. "Any shout of pain."

The US has agreed to provide intelligence and equipment to help prevent Hamas smuggling weapons into Gaza through tunnels. Europe has offered assistance in monitoring weapons shipments from countries such as Iran. With that deal in place, it appears Israel decided it did not need to make the concessions demanded by Hamas for a ceasefire, particularly the lifting of the economic blockade of Gaza.

Britain has offered naval resources to help stop weapons being smuggled into Gaza, Brown said. The prime minister said he was prepared to help ensure proper protection and monitoring of crossings into the enclave.