An Egyptian court has listed the Palestinian group Hamas as a terrorist organisation, accusing it of supporting an insurgency in northern Sinai.
The ruling comes a month after a different court labelled the armed wing of Hamas as a terrorist group.
Hamas, which controls the Gaza Strip, is an offshoot of Egypt's Muslim Brotherhood - itself designated as a terrorist organisation in 2013.
Egypt's Muslim Brotherhood President Mohammed Morsi was ousted that year.
The court ruling on Saturday effectively bans Hamas within Egypt, a wider verdict that January's censure of its armed wing.
"It has been proven without any doubt that the movement has committed acts of sabotage, assassinations and the killing of innocent civilians and members of the armed forces and police in Egypt," Judge Mohamed el-Sayed said, according to state news agency Mena.
The decision was condemned by Hamas leadership, which said it "serves the Israeli occupation".
The ruling was "shocking and dangerous", Hamas said, adding: "It will have no influence on the Hamas movement."
Egypt has traditionally played a key role in mediating between Israel and Hamas in Gaza, and is seen as a key player in any peace or security talks.
The ruling was made after two complaints were filed against the militant group implicating it in attacks against the police and army in the Sinai, a judicial source told the AFP news agency.
Militants in the peninsula have killed scores of policemen and soldiers since President Morsi's downfall in 2013, vowing revenge for government moves against his supporters that have resulted in more than 1,400 people being killed.
Hamas dominates Gaza and fought a 50-day war with Israel last year. Under its charter, the movement is committed to Israel's destruction.
Israel, the United States and several other nations have designated Hamas a terrorist organisation over its long record of attacks and refusal to renounce violence.
Hamas, which was founded in 1987, won Palestinian parliamentary elections in 2006 and reinforced its power in Gaza the following year after ousting its Fatah rivals.
Its supporters see it as a legitimate resistance movement against Israel, with whom it has fought for years.