Prime Minister Ehud Olmert announces the ceasefire
Israel has begun a unilateral ceasefire in Gaza, three weeks after launching a full-scale assault against Hamas.
Prime Minister Ehud Olmert said Israel had achieved its goals and Hamas - which has been firing rockets at Israel - had been defeated.
But hours later, five rockets fell near the Israeli border town of Sderot, and there was a brief exchange of fire.
Israel said its troops would remain in Gaza for now. Hamas said it would not accept one Israeli soldier in Gaza.
Nearly 1,200 Palestinians have been killed since the violence began on 27 December. Thirteen Israelis have died.
The US has welcomed the ceasefire, saying it "expects that all parties will cease attacks and hostile actions immediately".
UN Secretary General Ban Ki-moon expressed relief, saying the ceasefire should be "the first step leading to the full withdrawal of Israeli troops from Gaza".
Aid organisations have expressed concern that crossings into Gaza will not reopen fully unless Hamas is committed to a ceasefire.
The Israeli prime minister's announcement came in a televised address following a late-night cabinet meeting.
Israel's "goals have been achieved, and even more", Mr Olmert said.
Hamas was badly damaged both militarily and in terms of government infrastructure; rocket factories and dozens of smuggling tunnels had been destroyed, he said.
But the success of the ceasefire depended on Hamas, he said.
Troops would remain in Gaza for the time being and if Hamas held fire, the military would "consider pulling out of Gaza at a time that befits us".
If militant rocket fire into Israel continued, Israel would respond with force, the Israeli leader added.
A Hamas spokesman, Fawzi Barhum, condemned the move. Hamas could not "accept the presence of a single [Israeli] soldier in Gaza", he said.
Osama Hamdan, the Hamas representative in Lebanon, said Israel had failed in its objectives
Israel must withdraw completely, lift its economic blockade of Gaza and open border crossings, the spokesman said.
BBC Middle East editor Jeremy Bowen says the question now is whether Hamas decides to lick its wounds and regroup - or whether it gambles on dragging Israel into a war of attrition.
Hamas representatives have been taking part in talks in Cairo, brokered by Egyptian President Hosni Mubarak, aimed at reaching a bilateral deal.
Egypt will on Sunday host a summit, attended by Palestinian leader Mahmoud Abbas, the UN chief and several EU leaders, aimed at securing a permanent truce.
Representatives of Germany, Britain, France, Italy, Spain, Turkey and Jordan are expected to attend the meeting in the Red Sea resort of Sharm el-Sheikh.
On Saturday, Germany, France and Britain sent identical letters to the Israeli and Egyptian governments offering support for a ceasefire and their help in preventing arms smuggling into Gaza.
Minutes before Mr Olmert spoke, a rocket was fired from Gaza, a BBC producer in Gaza said.
The Israeli announcement came on the 22nd day of violence in Gaza.
HAVE YOUR SAY
If Hamas is not involved then the cease fire is agreed with whom?
Khizar Mohammed, Mumbai, India
Israel carried out more than 50 air strikes on Gaza on Friday night, as Hamas rocket fire from the territory continued.
United Nations officials said two children, aged five and seven, were killed when Israeli tank fire hit a UN school where hundreds had taken shelter in the northern town of Beit Lahiya.
Chris Gunness, a spokesman for the UN Relief and Works Agency (Unrwa), said an investigation was needed "to determine whether a war crime has been committed".
An Israeli foreign ministry spokesman, Yigal Palmor, told the BBC that Israel was waiting for more information on what happened.