Correction: An earlier version of this article incorrectly said the Fatah rally marked the 48th anniversary of organization’s founding. The rally marked the organization’s first armed mission. An updated online version clarifies this.

Palestinians climb an electric pole during a rally marking the 48th anniversary of theFatah movement’s first armed attack on Israel, in Gaza City. (Mohammed Salem/Reuters)

The Fatah party of Palestinian Authority President Mahmoud Abbas held a mass rally in Gaza on Friday to mark the 48th anniversary of the organization’s first armed mission, the first such gathering permitted by the rival Islamist Hamas group since it seized control of the territory in a brief civil war in 2007.

The rally was another sign of thawing relations between the factions since November, when Israel launched a military offensive to halt rocket fire from Gaza and Abbas won limited recognition of Palestinian statehood at the United Nations.

Hamas has enjoyed a surge of popularity among Palestinians after firing rockets deep into Israel during the recent conflict, and Fatah has been buoyed by the U.N. statehood vote, spurring renewed moves to carry out a stalled reconciliation accord signed by the factions in 2011.

Hamas granted permission for the Fatah rally in Gaza after it was allowed to hold two anniversary rallies last month in the West Bank, parts of which are controlled by the Fatah-led Palestinian Authority. Since their split five years ago, each faction had banned public gatherings by its rival.

The rift has divided Palestinians politically and geographically, dealing a heavy blow to their hopes for an independent state in the West Bank and Gaza Strip.

On Friday, tens of thousands of people, many waving yellow Fatah banners, gathered in Saraya Square in Gaza City in what witnesses described as a carnival atmosphere. Crowds had camped in the square overnight to ensure themselves a spot, and the throng included many families with children.

“We feel like birds freed from our cage today,” Fadwa Taleb, a former police officer in Fatah’s disbanded security forces, told the Associated Press. “We are happy and feel powerful again.”

The jostling crowd surged onto a stage where Fatah leaders, including senior figures from the West Bank, were assembled, witnesses said. The ensuing chaos forced organizers to cut the gathering short after Abbas gave a video address from his headquarters in Ramallah.

Abbas told the crowd that “soon we will regain our unity,” which he called “a step on the way to ending the [Israeli] occupation.”

Nabil Shaath, a senior Fatah official who had arrived from the West Bank, said that the party had received a congratulatory message from Ismail Haniyeh, the Hamas prime minister in Gaza, expressing hope that the two factions could resolve their differences.

Sami Abu Zouhri, a Hamas spokesman, called the rally a success for both Fatah and Hamas, adding that “the positive atmosphere is a step on the way to regain national unity.”

An Egyptian official said Cairo planned to invite the two factions for talks within two weeks, the Reuters news agency reported.

Yet for all the conciliatory rhetoric, daunting obstacles remain before the power-sharing agreement can be put in place. Moves to set up an interim government have stalled, and arrangements for holding elections faltered after Hamas stopped voter registration work in Gaza, citing what it said were measures taken against its supporters in the West Bank.

The rivals are also at odds over policies toward Israel. Hamas refuses to recognize Israel and advocates violence against it, while Fatah supports negotiations with the Israelis to reach a two-state solution to the Palestinian-Israeli conflict.

Islam Abdul Karim in Gaza City contributed to this report.