Palestinian factions were in Cairo on Tuesday for reconciliation talks aimed at choosing a prime minister to head a unity government. Palestinian president Mahmud Abbas\'s Fatah delegation led by Azzam al-Ahmad and the Hamas delegation headed by Mussa Abu Marzuk sat down for talks at the Egyptian intelligence headquarters in Cairo, attended by Egyptian officials, the MENA state agency said. Fatah has said it wants to retain prime minister Salam Fayyad to head the government, but the nomination was immediately rejected by Islamist Hamas movement. Both sides however said they were optimistic they would come to an agreement. \"God willing this will be the last round of talks regarding the formation of the government,\" MENA quoted Ahmad as saying ahead of the meeting. \"We hope to agree on the name of a prime minister and the members of the government...We, in Fatah, insist on ending the chapter of division and to implement the deal on the ground. We are optimistic,\" he said. The Egyptian-sponsored talks are the fruit of a reconciliation agreement signed in Cairo in May aimed at ending years of bitter feuding and laying the groundwork for presidential and legislative elections within a year. Fatah\'s central committee agreed on Saturday to throw their support behind Fayyad, a former World Bank official and preferred candidate of the international community. But Hamas has rejected Fayyad, blaming him for the arrest and alleged torture of its leaders, and plunging the Palestinian Authority into debt. Izzat al-Risheq, a member of the Hamas politburo, said ahead of the Cairo talks that the best way forward on the unity government was to exclude controversial candidates. \"A main principle we have agreed on is that thorny issues or disagreements be dealt with by both sides through consensus. Therefore the government will be one of consensus and no side will impose its view on the other,\" MENA quoted Risheq as saying. \"We feel the best way is to exclude controversial choices,\" he said. On Sunday, Hamas spokesman Sami Abu Zuhri reiterated his movement\'s rejection of Fayyad. \"Hamas informed Fatah during the last meeting of its rejection of the choice of Salam Fayyad to head the new government,\" Zuhri told AFP. \"The Fatah central committee\'s nomination of Salam Fayyad to head the government is a Fatah nomination and any head of the new government must be chosen by consensus and not, of course, by one of the parties.\" Hamas has yet to put forward a candidate for the prime minister\'s post. Risheq said the two sides will also be discussing the release of political prisoners taken by both sides.