An Egyptian court on Tuesday banned all activities of Hamas in Egypt, a judge said, in another sign that security forces plan to squeeze the Palestinian militant group that runs the neighbouring Gaza Strip.

Hamas is an offshoot of Egypt's Muslim Brotherhood, which has been declared a terrorist group by Egypt's army-backed government and has faced a security crackdown since the military ousted one of its leaders, Mohamed Morsi, from the presidency last July.

"The court has ordered the banning of Hamas work and activities in Egypt," the judge, who asked to remain anonymous, told Reuters.

Egyptian authorities see Hamas as a major security threat, accusing the group of supporting al-Qaeda inspired Islamist insurgents in the Sinai peninsula, allegations it denies.

The court also ordered the closure of Hamas offices in Egypt, one of the judges overseeing the case told Reuters.

Hamas condemned the ruling, saying it targeted the Palestinian cause.

The case was filed by a group of Egyptian lawyers last year asking for Hamas to be banned and be designated as a terrorist organization.

When Morsi was in power, Hamas held its secretive internal elections in Egypt in 2012. A top Hamas official, Musa Abu Marzouk, lives in Cairo and may be at risk of arrest by the new court decision.

After crushing the Muslim Brotherhood at home, Egypt's military rulers plan to undermine Hamas, senior Egyptian security officials told Reuters in January.

The aim, which the officials say could take years to pull off, includes working with Hamas's political rivals Fatah and supporting popular anti-Hamas activities in Gaza, four security and diplomatic officials said.

Since it seized power in Egypt last summer, Egypt's military has squeezed Gaza's economy by destroying most of the 1,200 tunnels used to smuggle food, cars and weapons to the coastal enclave, which is under an Israeli blockade.

Now Cairo is becoming even more ambitious in its drive to eradicate what it says are militant organizations that threaten its national security.