A Cairo court ruled on Tuesday that the government must destroy all tunnels between Egypt and the Gaza Strip, removing a route for smuggled weapons and other goods.

President Mohammed Morsi’s national security adviser Essam Haddad has said Egypt will not tolerate the two-way flow of smuggled arms through the tunnels that is destabilizing the Sinai Peninsula.

Despite close ties between the Muslim Brotherhood and Hamas, many Egyptians fear Gaza is a security risk for Egypt, and Egyptian forces flooded some of the tunnels earlier this month.

“The court ruled to make it obligatory that the government destroys the tunnels between Egypt and the Gaza Strip,” Judge Farid Tanaghou said.

An estimated 30 percent of goods that reach Gaza’s 1.7 million Palestinians come through the tunnels, circumventing the blockade imposed by Israel and Egypt for more than seven years.

“I filed the case because I was worried about the state of national security in my country after the rise of the Muslim Brotherhood to power and its unclear policies and links with Hamas,” said Wael Hamdy, a lawyer who brought the case.

He said the case had been brought after 16 Egyptian border guards were killed last August by militants near the Gaza border.

Cairo said some of the gunmen had entered Egypt through the Gaza tunnels, an accusation denied by the Palestinians. Dozens of tunnels have been destroyed since that incident, but, according to Hamdy, 2,000 are still open.