The leaders of the Palestinian factions Hamas and Fatah have agreed to reconcile, under a deal criticized by Israel.
The reconciliation deal aims to unify the rival Palestinian governments with an interim government leading to elections next year. After a brief, last minute delay, the ceremony got underway with Palestinian President Mahmoud Abbas, Hamas chief Khaled Meshaal and foreign dignitaries in attendance.
While the planned caretaker government has been described by Fatah officials as an independent body of technocrats, Meshaal struck a more political tone.
The Hamas leader told the gathering that "the black page of division" was behind them, and that the only real battle is with "the occupier" - a reference to Israel.
Israel has condemned the deal, with Prime Minister Benjamin Netanyahu on Wednesday saying it is "a tremendous blow to peace and a great victory for terrorism,"
Netanyahu has urged Abbas to choose "peace with Israel" over any deal with Hamas - considered a terrorist organization by Israel and the United States.
Hamas, which does not recognize Israel, is said to be willing to honor an unofficial truce.
But Meshaal's statement, as well as continued attacks from Gaza on Israel, are likely to undermine any Israeli confidence in that position.
President Abbas also took the occasion to challenge Israel, saying it must choose between peace and settlements. Israeli building on Palestinian lands has proved a key obstacle to the peace process.
Among supporters of Palestinian statehood, the deal in Cairo is seen as the only way to move forward and end the rivalry which has split the Palestinian movement for the past four years amid fighting over control of Gaza.
"The real issue is to get together, speak with one voice, to pave the way for the future," said Hassan Nafae, a political science professor at Cairo University. "And this is a very, very important step and I think without it nothing will happen at all."
Egypt's role in cementing the deal comes as the new government in Cairo indicated it would open the Rafah border crossing to Gaza and ease the pressure of an Israeli blockade.
Whether this played a role in bringing the two sides together is unclear, although Egypt had worked in vain for reconciliation for years.
"Once you have a unified government there will be no pretext at all to continue the closure of Rafah," said Nafae.
Egypt under former President Hosni Mubarak had closed Rafah after the Hamas victory in Gaza in 2007, citing Cairo's commitments to existing peace deals. The old government also used the threat of militancy spilling into Egypt as another reason to keep the crossing strictly controlled.