The Hamas-led Palestinian government resigned Thursday, and Palestinian Authority Chairman Mahmoud Abbas asked Prime Minister Ismail Haniyeh of Hamas to form a new unity government.

"Mr Ismail Haniyeh, we designate you to form the Palestinian government," Abbas told Haniyeh at a joint news conference in Gaza City, after accepting Haniyeh's resignation as a first step toward forming the joint government and ending factional fighting.

Abbas told Haniyeh "I invite you to respect" past Palestinian agreements with Israel. Haniyeh vowed to "work in accordance" with Abbas's letter of designation.

The PA chairman gave Haniyeh five weeks to form the government, instead of the three weeks afforded him by law.

Abbas and Haniyeh met in Gaza on Thursday for talks aimed at resolving disputes over the powerful security forces that have touched off a critical first challenge to their rival factions' power-sharing agreement.

Efforts to implement the agreement brokered in Saudi Arabia ran into trouble Wednesday when Hamas presented several conditions for forming the government, said an aide to Abbas, Nimer Hamad.

With Hamas refusing to resign from the government until Abbas' Fatah movement meets the conditions, the deal could not be finalized.

On Wednesday night, Abbas canceled a speech scheduled for Thursday in which he was expected to officially appoint Haniyeh to form the unity government.

Abbas made the decision after Hamas presented three conditions for Haniyeh's resignation from his post, which was to have enabled Abbas to make him prime minister of the new government.

Hamas is demanding that the unity government recognize every decision made by the current Hamas government, including the establishment of a Hamas security force and various political appointments. It wants Abbas to announce immediately which of two Hamas candidates is to be interior minister.

Finally, it is demanding that Ziad Abu Amar, who is tipped for the post of foreign minister, be considered an independent candidate so as not to dip into Hamas' cabinet quota.

Another point of contention concerns the appointment of a deputy prime minister. On Tuesday a Fatah leader in the Gaza Strip, Maher Mekdad, said that Abbas wanted to appoint Mohammed Dahlan, a fierce anti-Hamas figure, as deputy prime minister. Mekdad, who was in the Fatah delegation to the talks in Mecca, said the agreement reserves the deputy PM post for someone from Fatah.

The agreement also states, however, that Hamas must approve the appointment.

Dahlan is a Fatah member of the Palestinian parliament, and is the commander of the Palestinian security forces under Abbas, which clashed with Hamas militants in the recent confrontations in Gaza.

Hamas sees Dahlan as a sworn enemy, and is fiercely opposed to his being named deputy prime minister. Hamas figures have threatened to harm Dahlan in the past several months, and Fatah officials claim there was an assassination attempt against him.

Hamas also tried to prevent Dahlan from attending the Mecca talks, but Saudi Arabia rejected the attempt to bar him.

The spokesman for the PA government, Razi Hamad, said that another issue that remains to be finalized between Fatah and Hamas is the interior minister's identity. According to the Mecca agreement, Hamas is to select an independent candidate for interior minister, who must then be approved by Abbas.