Cairo: An Egyptian court on Saturday banned the armed wing of the Palestinian group Hamas and listed it as a ‘terrorist’ organisation.

The ruling came days after the country faced some of the bloodiest attacks on security forces in years.

Hamas is an offshoot of Egypt’s Muslim Brotherhood, which the authorities have also declared a ‘terrorist’ group and have cracked down on since the army ousted one of its leaders, Mohammad Mursi, from the presidency in 2013.

“The court ruled to ban the Qassam Brigades and to list it as a terrorist group,” said judge Mohammad Al Saeed of the special Cairo court, which deals with urgent cases.

The case was based on allegations that the Qassam Brigades staged terrorist attacks in support of the Brotherhood, and carried out a bombing and shooting spree that killed 33 security personnel in the Sinai peninsula in October 2014.

“We reject the Egyptian court’s decision against the Qassam Brigades. It is a political, dangerous decision that serves only the Zionist occupation,” said Hamas spokesperson Sami Abu Zuhri.

Egyptian officials say weapons are smuggled from the Hamas-ruled Gaza Strip into Egypt, where they end up with militant groups fighting to topple the Western-backed Cairo government.

Insurgents based in Egypt’s Sinai region, which has a border with Gaza, have killed hundreds of police and soldiers since Mursi’s overthrow. The insurgency has flared in other parts of the country as well.

On Thursday night, four separate attacks on security forces in North Sinai were among the worst in years. Daesh’s Egyptian wing, Beit Al Maqdis, claimed the killing of at least 30 soldiers and police officers.

President Abdul Fattah Al Sissi brought a degree of stability to Egypt and the economy had started to recover from frequent political violence since a popular uprising four years ago that overthrew veteran autocrat Hosni Mubarak.

Then signs of discontent emerged in the past week. More than 25 people were killed last weekend when security forces fired at protesters angered by what many perceive as a police state re-established by Al Sissi since Mursi’s fall.

Egyptian officials say the Brotherhood, Daesh, Al Qaida and Sinai Province, previously called Ansar Beit Al Maqdis, share the same ideology.

The Brotherhood says it is committed to peaceful activism despite facing one of the toughest crackdowns in its history.

Militant attacks in Sinai, while far from Cairo and tourist attractions, have hurt government efforts to project an image of stability to win back foreign investors and tourists.