Prime Minister Ehud Olmert had said after a meeting of his security cabinet he was calling an immediate end to offensive operations but added that troops would stay in Gaza for the time being with orders to return fire if attacked.
"At two o'clock in the morning we will stop fire but we will continue to be deployed in Gaza and its surroundings," Olmert said in a speech after the vote.
"We have reached all the goals of the war, and beyond," he added.
An army spokesman confirmed at 2am that the order to stand down had gone into effect.
Hamas had said in response to Olmert's announcement that it would not accept the presence of a single soldier in the territory, while Palestinian president Mahmud Abbas said the ceasefire should be followed by a full pull-out.
Defence Minister Ehud Barak acknowledged there was "no guarantee" that Hamas would stop firing rockets but said the army would hit back "severely."
"The army will stay as needed and if Hamas continues to fire, the army will fire back severely and will be ready to follow and intensify its operations as necessary," he said.
The response from Hamas, an Islamist group which has ruled Gaza since 2007 and is sworn to the destruction of the Jewish state, stopped short of an outright threat to continue the rocket attacks.
"We will not accept the presence of a single soldier in Gaza," Fawzi Barhum, a Gaza-based Hamas spokesman, said, before restating the movement's demands for a complete Israeli withdrawal and the opening of Gaza's border crossings.
One of the main aims of the offensive has been to put a halt to rocket and mortar attacks but more than 30 projectiles were fired from Gaza on Saturday, including eight fired after Olmert's announcement.
Egypt's President Hosni Mubarak, who had been striving to broker a bilateral truce between Israel and Hamas, said only an unconditional ceasefire would suffice and called for all troops to leave the territory.
Mubarak and French President Nicolas Sarkozy are to co-host a summit on Gaza in the Egyptian resort of Sharm el-Sheikh Sunday which will also be attended by a string of European leaders, the king of Jordan and UN chief Ban Ki-moon.
In the hours leading up to the security cabinet meeting, Israel kept lobbing shells into the densely populated urban area, while to the north in Beit Lahiya a UN-run school was set ablaze by bombs.
Two brothers, aged five and seven, were killed and another dozen people wounded in the attack, in which burning embers trailing smoke rained down on a school where some 1,600 people were sheltering, setting parts of it alight.
Ban called the fourth such attack on a UN-run school during the war "outrageous" and demanded a thorough investigation.
During the course of the war, schools, hospitals, UN compounds and thousands of homes all came under attack with the Palestinian Authority putting the cost of damage to infrastructure alone at 476 million dollars.
At least 1,206 Palestinians, including 410 children, have been killed since the start of Israel's deadliest-ever assault on the territory on December 27, according to Gaza medics, who said another 5,300 people have been wounded.
Those slain in the war also include 109 women, 113 elderly people, 14 paramedics, and four journalists, according to Dr. Muawiya Hassanein, the head of Gaza emergency services.
Since the start of the operation 10 Israeli soldiers and three civilians have been killed in combat or in rocket strikes. The army says more than 700 rockets and mortar rounds have been fired into Israel during that period.
The halt to the violence came after the Jewish state won pledges from Washington and Cairo to help prevent arms smuggling into Gaza, part of the Palestinians' promised future state.
Although Egypt has not given any details about what assurances it has given Israel, Secretary of State Condoleezza Rice signed a pledge on Friday promising "enhanced US security and intelligence cooperation with regional governments on actions to prevent weapons and explosive flows to Gaza."
The ceasefire comes less than a month before Israel holds elections when Olmert, who formally resigned last autumn, is due to stand down.
The premier, whose reputation was badly damaged by a 2006 war in Lebanon seen by many Israelis as a disaster, said the Gaza war had "strengthened the deterrence of the state of Israel in the face of all those who threaten us."
"Hamas received a hard blow. Its leaders are hiding. Many of its men have been killed. Dozens of tunnels have been bombarded. The ability to launch rockets into Israel has been reduced."
Follow Emirates 24|7 on Google News.