Egypt Hamas
Members of Palestinian security forces loyal to Hamas march during a military graduation ceremony in Gaza City May 21, 2015. Reuters/Suhaib Salem

CAIRO (Reuters) - An Egyptian appeals court on Saturday canceled a ruling to list the Palestinian group Hamas as a terrorist organization, judicial sources said.

Hamas is an offshoot of Egypt's Muslim Brotherhood which the authorities have also declared a terrorist group and have repressed since the army ousted one of its leaders, Mohamed Mursi, from the presidency in 2013.

Cairo has for many years played a central role in engineering ceasefires between neighboring Israel and Hamas, which dominates the Gaza Strip, including a truce reached between the sides in August that ended a 50-day Gaza war.

The lawyer who first raised the case told Reuters he would request that Egypt's Foreign Ministry place Hamas on its list of terrorist organizations, based on previous judicial decisions.

"This ruling does not return us to zero. I have two rulings placing the Brotherhood and the Izz ad-Din al-Qassam Brigades on the list of terrorist organizations," Ashraf Farahat said.

Qassam Brigades, the armed wing of Hamas, was classified as a terrorist organization by Egypt in January.

Hamas has rejected the courts' decisions, while the Brotherhood maintains it is committed to peaceful activism and rejects links to violence.

(Reporting By Stephen Kalin; Editing by Janet Lawrence)