A ceasefire between Israel and Lebanese militant group Hezbollah will come into force at 0500 GMT on Monday, UN Secretary General Kofi Annan has said.
An estimated 30,000 Israeli troops are now in Lebanon
He announced the move after talks with Lebanon's and Israeli prime ministers.
But Israel's army says it will not leave southern Lebanon until regular Lebanese troops are deployed there, supported by an expanded UN force.
Hezbollah says it has the right to continue attacks until the last Israeli soldier has left Lebanese soil.
The UN says it could take 10 days to insert a bolstered peacekeeping force.
Announcing the agreed terms of the ceasefire, Mr Annan said he was "very happy", but added that "preferably, the fighting should stop now".
He insisted that the UN would work with the Lebanese and Israeli governments to ensure the ceasefire held.
But Australian Prime Minister John Howard said he had serious concerns about whether the ceasefire could last unless Hezbollah was disarmed.
Heavy fighting is continuing near the border between Lebanon and Israel, particularly around the Lebanese city of Tyre.
Sunday saw Israeli planes and artillery bombard hills and villages to the south and east of the city, hitting most of the remaining petrol stations in the area.
A mother and her three children were among those who died in one village.
Hezbollah guerrillas fired more rockets into northern Israel, killing at least one person in the town of Yaara and wounding several in Safed.
Security Council resolution
Mr Annan's announcement followed the UN Security Council's unanimous adoption on Friday of a resolution designed to end four weeks of fighting.
The Israeli Cabinet approved the resolution at a meeting on Sunday.
Hezbollah's leader, Sheikh Hassan Nasrallah, said on Saturday that his group would abide by the resolution, which has also been endorsed by the Lebanese government.
But he added: "As long as there is Israeli military movement, Israeli field aggression and Israeli soldiers occupying our land... it is our natural right to confront them, fight them and defend our land, our homes, and ourselves."
An Israeli foreign ministry spokesman told BBC Radio Five Live that Israeli forces would respond if attacked by Hezbollah.
"If Hezbollah decides to violate the resolution and declare their own terms... well the Israeli army will certainly not stand aside and fail to respond, that's for sure," Ylgal Palmor said.
Some Israeli estimates put the number of Israeli troops now in southern Lebanon at 30,000.
On Saturday, Israeli troops reached the key target of the Litani River, while its jets hit a string of targets in Lebanon, killing some 40 Hezbollah fighters.
The Israeli army suffered its highest number of casualties in a single day since the conflict began, with 19 troops confirmed killed and a further five presumed dead after their helicopter was shot down.
One of the five was a woman, Sgt Maj Keren Tendler. Her death, if confirmed, would make her the first female soldier killed in action in the conflict.
More than 1,000 Lebanese and more than 120 Israelis have been killed in the conflict since Hezbollah militants captured two Israeli soldiers on 12 July in a cross-border raid.