Rival Palestinian factions Hamas and Fatah reached a "comprehensive" agreement Thursday for the return of their unity government in Gaza after two days of talks in Cairo, negotiators from both sides said.

The Palestinian rivals had set up a unity government of independents in June but it never took hold, with Palestinian president Mahmud Abbas accusing Hamas of running a "parallel" administration as de facto ruler in the Gaza Strip.

Hamas in turn accused Abbas's Palestinian Authority, headquartered in Ramallah, of not paying its 45,000 employees in Gaza.

"Fatah and Hamas have reached a comprehensive agreement for the unity government to return to the Gaza Strip," Jibril Rajoub of Fatah told AFP.

Senior Hamas official Mousa Abu Marzouk and Fatah's head of delegation, Azam al-Ahmad, confirmed that an agreement had been reached.