By Jeremy Bowen
BBC Middle East Editor
Israel's three-week offensive has had a high human cost
Hamas has said it will fight on until Israeli forces satisfy their conditions for a ceasefire.
Reuters quoted Hamas spokesman Fawzi Barhoum as saying: "A unilateral ceasefire does not mean ending the aggression and ending the siege… These constitute acts of war, so this won't mean an end to resistance."
Israel's assessment is that Hamas is in a lose-lose position. It believes that if Hamas accepts a ceasefire, it will show that it is beaten.
And if it does not stop shooting when Israel does, then the Israeli army will go back on to the offensive.
If that happens Israel believes it will have increased international legitimacy because it has declared that it is ready to stop fighting.
Hamas has repeated its conditions for a ceasefire. It wants a withdrawal of Israeli forces within a week, and the opening of Gaza's crossings to the outside world.
Israel says Hamas has to take it or leave it. 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.
By saying that it will stop now, Israel will feel it will start on the right foot with the Obama administration in Washington after it takes office on Tuesday. And if Israel did start to fight again, it would expect to get the backing of the new president.
In his speech in Tel Aviv announcing why Israel was ending its offensive, Prime Minister Ehud Olmert said that Hamas had been hit hard.
Its military installations and government infrastructure had been badly damaged. Its leaders were hiding, many of its people dead, rocket factories had been destroyed and dozens of smuggling tunnels bombed.
He went on to tick off a whole series of points that he said had been Israeli successes. They included the performance, levels of training and equipment of reservists and the ability of the leadership to make decisions.
It was no coincidence that the list included all the points that Israelis believe went wrong in the Lebanon war in 2006, just after Mr Olmert became prime minister. The 2006 setback did great damage to his reputation. It looked tonight as if he believed he had redeemed himself as a leader.
Pain and death
Israel says that its troops can stop because they have broken the Hamas military wing and sent a message to all the country's enemies that they should be scared, very scared, about what the Israeli army could do to them.
But at what cost? At least 1600 people, displaced from their homes, were sheltering in a UN school in Gaza this morning when it took a direct hit from an Israel shell. Two young brothers, aged five and seven, were killed.
John Ging, who runs UN refugee operations in Gaza was there soon after the attack, demanding an investigation into whether Israel had broken the laws of war. He said the two boys were indisputably innocent.
After inflicting so much pain and death, Israel still says that Gaza's civilians are not its enemy. That is something that Gazans - and millions of others in this part of the world - do not believe.