The leaders of warring Palestinian factions Fatah and Hamas met in Cairo on Wednesday to sign a reconciliation agreement that ends four years of bitter strife.

Hamas leader Khaled Meshaal said at the ceremony that the Islamist group wanted the establishment of an independent, sovereign Palestinian state on land of the West Bank and Gaza Strip with Jerusalem as its capital.

"Hamas was ready to pay any price for internal Palestinian reconciliation," Meshaal continued. "The only battle of the Palestinians is against Israel."

"Our aim is to establish a free and completely sovereign Palestinian state on the West Bank and Gaza Strip, whose capital is Jerusalem, without any settlers and without giving up a single inch of land and without giving up on the right of return (of Palestinian refugees)," Meshaal said.

Palestinian President Mahmoud Abbas said in his opening address at the ceremony that the Palestinians were turning a "black page" on division between Hamas and Fatah.

"We announce the good news from Egypt which has always carried its national and historical responsibility towards the Palestinian people. Four black years have affected the interests of Palestinians. Now we meet to assert a unified will," he said.

"Israel is using the Palestinian reconciliation as an excuse to evade" a peace deal," Abbas added. "Israel must choose between peace and settlement."

The ceremony finally got underway in the afternoon after a last-minute row over foreign policy threatened to scupper the deal.

The row that threatened to hold up the Egypt-brokered agreement signing of the reconciliation deal began when Palestinian President Mahmoud Abbas insisted on being the sole speaker at the event. Abbas apparently wanted to sit alone by the podium, to emphasize his status as president, despite the fact that Hamas leader Khaled Meshaal was supposed to speak directly following him.

The move reportedly illustrated his expectance to be the head of the interim unity government, which would allow him to control Palestinian foreign policy.

Fatah's foreign policy includes negotiating toward a peace agreement with Israel, something which Hamas opposes.

The leaders of the Palestinian factions Fatah and Hamas arrived in Cairo on Wednesday to sign a reconciliation agreement to end four years of bitter in fighting sparked by Hamas' bloody takeover of the Gaza Strip in June 2007.

Fatah leader Abbas and Hamas' Meshal were to sign the agreement in the presence of representatives of Egypt's Supreme Council of the Armed Forces, Egypt's governing body since the January revolution in that country. Egypt is considered the patron of the reconciliation process and the agreement.

Officials from all the Palestinian factions had earlier signed the deal that Meshaal and Abbas were expected to endorse at the ceremony.

In a symbolic step before the ceremony on Wednesday, Hamas allowed Fatah-controlled Palestine TV to broadcast from Gaza for the first time since the 2007 takeover. The station's Gaza correspondent, Adel Zaanoun, discussed the excitement that Gazans felt about unity and invited Ismail Radwan, a Hamas leader, onto the program.

"Today we end a dark chapter in our recent history," Radwan said. "It's time now to work together ... With the support of our people and the Arab brothers, we will make this agreement work."

Also for the first time, Hamas permitted residents to wave yellow Fatah banners along with the green Hamas flags. Fatah displays had been banned by Hamas police in the past.