Talks between Hamas and Fatah on forming a Palestinian unity government have failed, Fatah officials reported Friday. Among the terms of the proposal was that Hamas would keep most ministerial posts according to its parliamentary majority. Fatah would retain the post of prime minister. Palestinian Authority President Mahmoud Abbas and PA Prime Minister Ismail Haniyeh agreed Wednesday to work toward forming a national unity government that will bring together Hamas, Fatah and other factions. The two - according to their aides - are hoping that the move will pave the way for the international community to resume financial aid to the PA. Abbas and Haniyeh have invited Islamic Jihad to join the prospective government - an invitation that has been turned down by leaders of the organization in the Gaza Strip and Syria. Abbas said on Friday that the Islamic Jihad refused to sign on officially, but agreed to refrain from attacks as long as the other terrorist groups did so. The agreement was reached during a meeting in Gaza City between Abbas and Haniyeh - their second in 24 hours. PA officials described the agreement as "significant" and said the two were hoping that the new government would be established by the end of the month. The apparent rapprochement between Fatah and Hamas was marred later in the day by heavy clashes between their supporters in the southern Gaza Strip. PA security officials told The Jerusalem Post that Suleiman Abu Nasr, 14, was killed and five others were wounded during the fighting. "We have agreed to open negotiations to discuss the possibility of forming a national unity government," Ghazi Hamad, spokesman for the Hamas-controlled PA government, told reporters in Gaza City after the Abbas-Haniyeh meeting. However, Hamad ruled out the possibility that such a government would be formed before Israel released all the Hamas ministers and legislators who were arrested after the abduction of Cpl. Gilad Shalit in June. "President Abbas and Prime Minister Haniyeh discussed the repercussions of the war in Lebanon on the Palestinians and ways of reaching a joint strategy between Fatah and Hamas to face the new challenges," he said. Hamad said Abbas was trying to resolve the Shalit issue quickly and peacefully because he feared Israel would step up military operations to secure his release. "The president warned all Palestinian factions against providing Israel with an excuse to escalate its aggression against the Palestinians now that the war in Lebanon has ended," Hamad said. "That's why he wants to end the case quickly and peacefully." Haniyeh said after the meeting that he agreed with Abbas on the need for a new government formed on the basis of the "national reconciliation" document that was drafted by a group of prisoners held in Israeli jails. The document does not recognize Israel's right to exist, but calls for the establishment of a Palestinian state in the West Bank, Gaza Strip and east Jerusalem. "Hamas is eager to enhance national unity among the Palestinians," Haniyeh said. "We want to see an end to the Israeli siege and Palestinian suffering. We also want to see our ministers and legislators released immediately. That's why we have agreed to start talks about forming a national unity government." While Fatah leaders expressed optimism about the prospects for forming a new government, Hamas officials warned that the initiative would not succeed as long as Israel continued to hold Hamas representatives in jail. Fatah leaders are expected to meet in Jordan soon to discuss joining a Hamas-led government. Mahmoud Ramahi, secretary-general of the Hamas-dominated Palestinian Legislative Council, said the council would not approve any government unless Israel released some 30 Hamas ministers and legislators, including PLC Speaker Aziz Dweik. "We have reached an agreement with Fatah on the formation of a national unity government, although we still haven't discussed details about the distribution of the portfolios," he said. "But our position is firm and clear - there can be no new government as long as our men are in prison." Deputy PLC Speaker Ahmed Bahr reiterated that Hamas would not recognize Israel's right to exist even if Fatah joined the government. "The prisoners' document does not recognize Israel," he said. "The new government will work toward legitimizing the Palestinians' right to pursue resistance against Israel. We hope the new government will help solve many of the problems our people are currently facing." Meanwhile, an IAF strike destroyed a house in Khan Yunis early Wednesday, crushing two men to death and wounding at least four neighbors, hospital officials said. The IDF said the house was used as a weapons store and that the residents had been warned to leave before the strike. Neighbors said residents of the house had apparently ignored the warnings. Hundreds of people gathered at the site as rescue workers dug amid the rubble, pulling out two badly mangled bodies. The house belonged to Hassan Shaath, a local Al Aksa Martyrs Brigades leader, but he was not among the casualties, family members said. They identified the two dead men as Ibrahim Shaath, also an Al Aksa member, and his father Ha'assan. They were cousins of the owner. Also Wednesday, the army said it shot two Palestinians trying to infiltrate from Gaza. The IDF could not confirm if they were killed and PA officials said ambulances could not reach the area. AP contributed to this report.