An Egyptian court has declared Hamas a "terrorist organisation", further isolating the rulers of the Gaza Strip who once found a warm welcome under the past government.
The ruling by Judge Mohamed el-Sayed of the Court For Urgent Matters described Hamas as targeting both civilians and security forces inside Egypt's restive Sinai Peninsula and aiming to harm the country.
The Sinai has been under increasing attack by Islamic extremists since the Egyptian military ousted Islamist president Mohammed Morsi in 2013.
"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," the ruling said, according to state news agency MENA.
In Gaza, Hamas official Mushir al-Masri condemned the decision and urged Egypt to reverse course.
"This ruling serves the Israeli occupation. It's a politicised decision that constitutes the beginning of Egypt evading its role toward the Palestinian cause," he said.
"This is a coup against history and an Egyptian abuse of the Palestinian cause and resistance, which fights on behalf of the Arab nation. We call on Egypt to reconsider this dangerous decision."
The ruling further isolates Hamas, which once found open support under Mr Morsi and from his now-outlawed Muslim Brotherhood group.
Egypt's new government has begun clearing a buffer zone along its border with Gaza in an attempt to destroy a cross-border network of tunnels that Hamas considers a lifeline.
Last month, an Egyptian court banned Hamas' military wing, the Izzedine al-Qassam Brigades, and also designated it a terrorist organisation.
The Cairo court said that Hamas fighters had used heavy weapons against the army and was colluding with the Brotherhood.
"It has been also ascertained with documents that (Hamas) has carried out bombings that have taken lives and destroyed institutions and targeted civilians and the armed forces personnel," the ruling said.
"It has also been ascertained that this movement works for the interests of the terrorist Brotherhood organisation."