Updated

A Cairo court has ruled to ban activities by the Palestinian militant Hamas group in Egypt, branding it a terrorist organization.

The court also ordered that Hamas offices in the country be shut down and all dealings with the group suspended.

Egypt's relations with Hamas have sharply deteriorated since the military removed Islamist leader Mohammed Morsi last July.

Hamas, which rules neighboring Gaza Strip, is the Palestinian chapter of Morsi's Muslim Brotherhood.

Morsi and scores of Brotherhood leaders are in detention, facing a multitude of trials on charges that carry the death penalty.

Two of those cases involve Hamas members, accused of assisting Morsi and others in escaping from prison in 2011. Morsi and others are also charged in a separate trial of leaking state secrets to Hamas.