An Egyptian court on Saturday branded the Palestinian Islamist movement Hamas a "terrorist" group over its alleged links with jihadists behind deadly attacks on security forces in the Sinai Peninsula.
The ruling took ties between Hamas and the authorities which ousted Egypt's elected Islamist president Mohamed Morsi in 2013 to a new low.
Hamas condemned what it called "a great disgrace which soils the reputation of Egypt".
It came almost a month after a court on January 31 designated Hamas's armed wing, the Ezzedine al-Qassam Brigades, a "terrorist" group.
Since the military toppled Morsi, the authorities in Egypt have accused Hamas of aiding jihadists who have staged a string of bloody attacks on security forces in the Sinai.
Egypt also accuses Hamas, which controls the neighbouring Gaza Strip, of supporting Morsi's blacklisted Muslim Brotherhood movement.
Last March, Egypt banned all Hamas activities on its soil and froze its assets.
Saturday's court ruling came after two complaints were filed against Hamas implicating it in deadly attacks on the police and army in the Sinai, a judicial source said.
"It was proven that the movement has committed acts of sabotage on Egyptian territory and killed innocent people, civilians and members of the police and army," the ruling said.
The court cited coordinated attacks in the northern Sinai at the end of January in which at least 25 soldiers were killed, saying that "the rockets used in this operation are found only in the Gaza Strip".
- New anti-terrorism law -
Signup to our newsletter and follow us on Facebook and Twitter!
Jihadists in the peninsula have killed scores of policemen and soldiers since Morsi's overthrow, vowing revenge for a crackdown on his supporters that has left more than 1,400 people dead.
The militant organisation Ansar Beit al-Maqdis (Partisans of Jerusalem), which has pledged allegiance to the Islamic State group, has claimed most of the attacks.
Saturday's ruling comes just days after Egypt adopted a new anti-terrorism law allowing the authorities to close the premises of any declared "terrorist" organisation and freeze its assets and those of its members.
Sami Abu Zuhri, the Hamas spokesman in Gaza City, denounced the ruling as "a desperate attempt to export Egypt's crises".
It amounted to "a dangerous escalation against the Palestinian people and the forces of Palestinian resistance" against Israel.
But it would have "no impact on Hamas which treats with respect all the sons and leaders of the Arab world, except for some influential persons in Egypt", Abu Zuhri said.
Israel and the United States view Hamas as a "terrorist" organisation, and the European Union decided in January to appeal a European court ruling ordering Hamas's removal from the EU's list of terror groups.
Egypt has accused Hamas militants of infiltrating through tunnels used by smugglers.
The army regularly announces the destruction of such tunnels, and is creating a buffer zone on the border with Gaza to counter the threat.
But despite this, Cairo has continued to play its traditional role of mediator between Hamas and Israel, as it did in the most recent Gaza war last July and August.
Gaza political professor Mukhaimer Abu Saada also described Saturday's ruling as a "dangerous escalation".
"Egypt may freeze the assets and investments in the country of Hamas individuals," but would not go as far as to jail members of the movement who have settled in Cairo, he added.