Hamas and Fatah have agreed to a ceasefire in Gaza effective from 3:00 am (0100 GMT) on Tuesday, the Palestinian foreign minister has said.
Mahmoud al-Zahar said: "A ceasefire will come into force at 3:00 am. All clashes must stop and armed men must withdraw immediately from the streets.
Reading out a joint statement by the two sides, al-Zahar said the factions have agreed to "pull all gunmen from the streets and remove checkpoints... return all security forces to their positions and end all forms of tensions".
"The president and the prime minister call on Hamas and Fatah to abide by the above mentioned agreement and to meet immediately to discuss all the remaining issues in preparation to resume the broad national meeting over the formation of a national unity government," al-Zahar said.
Clashes
Palestinian factions earlier clashed again in Gaza despite agreeing to participate in Saudi-mediated talks to end the worst bout of internecine violence in a year.
Thirty people have been killed and more than 100 others wounded in four days of fighting.
Gun battles between Hamas and Fatah raged throughout the night on Monday across the territory, where three people were killed in the southern town of Khan Younis and two others in Gaza City, medics said.
The unprecedented violence, the worst since Hamas's shock election win a year ago, has scuttled intermittent talks on forming a national unity government and left the Gaza Strip teetering on the brink of civil war.
'Disgraceful' fighting
Saudi Arabia's King Abdullah bin Abdulaziz Al-Saud offered on Sunday to hold talks in Mecca to stop the "disgraceful" fighting, a proposal welcomed by faction leaders.
"I invite my brothers of the Palestinian people, represented by their leaders ... to a quick meeting in their brotherly homeland Saudi Arabia ... to discuss their differences without any intervention from outside parties," he said in an appeal carried by the state news agency SPA.
Khaled Meshaal, the ruling Hamas movement's political chief, and Mahmoud Abbas, the Palestinian president, both welcomed the offer, though no date for the meeting has yet been announced.
Several previous efforts to end the feuding, including a rare meeting between Meshaal and Abbas in Damascus, have proved fruitless.
Nablus abductions
But the killings and tit-for-tat abductions have continued in both the Gaza Strip and the occupied West Bank.
An explosion early on Sunday morning rocked the Gaza City home of a bodyguard of Mohammed Dahlan, a powerful Fatah commander. No casualties were reported.
Anti-tank rockets and mortar shells were also fired at Fatah's police headquarters.
Also on Sunday, Fatah supporters, many of them masked, set ablaze the Nablus offices of the Hamas-controlled education ministry and abducted 11 Hamas members.
Hamas fighters in turn seized Shabn Abu Assar, the chief of the Palestinian security forces for Gaza, but released him after two hours.
Among the victims were an 11-year-old boy caught in the crossfire on Saturday night and a two-year-old child killed by a stray bullet during a firefight in Khan Younis on Friday.
Roadblocks set up
Throughout Gaza, the warring factions have set up roadblocks and continue to trade bursts of machinegun fire, and anti-rocket and mortar shells.
The territory has become deserted, with shopkeepers boarding up shops and staying in the relative safety of their homes.
Hamas has called on Abbas, who is outside the territory, to return home immediately to help put an end to the bloodshed.
The Arab League has condemned the fighting as "irrational and unacceptable" and Alvaro de Soto, the UN special co-ordinator for the Middle East peace process, called on all parties "to cease clashes".
PHOTO CAPTION
Palestinians carry the bodies of Tarek Nasrallah and Mahmoud Moshtaha, both killed on Sunday, during their funeral in Gaza City, Monday, Jan. 29, 2007. (AP)
Al-Jazeera