"The leaders of the two movements have agreed to the ceasefire," Hamas leader Nizar Rayyan said after meetings with Egyptian mediators.
Eight bodyguards were injured late Friday night when a convoy of Fatah officials came under fire as it traveled in the Gaza Strip.
Palestinian medicial officials said that two Palestinians injured earlier died of their wounds in hospital.
Meanwhile, Palestinian sources said that Palestinian President Mahmoud Abbas and Hamas' politburo Khaled Mashaal discussed the spiraling violence in Gaza during a conversation by phone on Friday night and agreed to shore up the ceasefire.
The two leaders agreed to negotiate an agreement to end the internecine bloodshed during talks hosted by Saudi Arabia next week.
Fatah officials said that Abbas is mulling early general elections if talks with Hamas leaders over the formation of a unity government collapse.
A ceasefire agreed upon by the two rival factions earlier this week collapsed on Thursday, touching off deadly clashes that claimed the lives of 25 people, including four children. Hospital officials said were running out of blood to treat the wounded, who numbered 250.
Secretary of State Condoleezza Rice said Friday that Middle East peace talks should resume despite
an outbreak of violence among Palestinian factions. "It doesn't help to talk about a timetable, but it does
help to talk about a commitment," Rice said after meeting with world powers for a strategy session on the Middle East.
Four Fatah-affiliated security officers, including the intelligence commander in the northern Gaza Strip, who were killed Friday morning in battles with Hamas members in the Gaza Strip. A Hamas member was killed later Friday.
Palestinian officials said an 11-year-old child and the wife of a Palestinian security officer were also among the casualties. A five- and an eight-year-old were also killed.
On Thursday evening, six Palestinians were killed as Fatah-affiliated security officers raided the Islamic University in Gaza, a Hamas stronghold, and arrested at least five Iranian agents.
Fatah officials claimed soon after the raid that the Iranian agents were dispatched by Tehran to Gaza to assist Hamas in building up it military wing and manufacture sophisticated weapons.
Hamas members responded with a counter attack on Friday morning during which over a dozen posts belonging to the Palestinian security forces were seized. Fatah-affiliated security officers were held hostage, and some posts were demolished.
Hamas gunmen clear Fatah post (Photo: AFP)
Eyewitnesses reported that during the Hamas raid, heavy exchanges of fire erupted in the Saraya compound, near Abbas' office. The headquarters of most Palestinian security organizations are located in the compound, where Hamas claims Fatah is storing weapon shipments.
Abbas, Mashaal meeting?The Saudi-brokered meeting between Abbas and Mashaal was to take place Tuesday, the official said. The two leaders met in Syria last month, but failed to reach an agreement on forming a unity government.
On Thursday evening, before the university raid, Hamas gunmen ambushed what the Islamist group said was a convoy carrying weapons to Abbas' presidential guard unit in the Gaza Strip.
Six Fatah members were killed, more than 70 people were injured and at least 12 gunmen of both rival factions were kidnapped in ensuing clashes.
Reuters and AP contributed to this report