As the Egyptian government tightens its grip on domestic dissent, with new accusations leveled against deposed president Mohammed Morsi and 24 others, Israel and Egypt are quietly cooperating against Hamas in Gaza, The Times of Israel has learned.

Israel is allowing Egyptian Apache helicopters, active in northern Sinai, to circle above the Gaza Strip to convey a menacing message to the Hamas regime.

“Cooperation is growing tighter on the intelligence and operational level — in fact, on all military levels,” an Israeli official said on condition of anonymity due to the sensitivity of relations between Israel and Egypt.

Egypt is primarily concerned with eradicating local Jihadist cells in the Al-Arish area, but believes that Hamas across the border has provided Egyptian radicals logistical aid and training. It has therefore been engaged in systematically destroying smuggling tunnels between Sinai and Gaza, which it considers a significant conduit of illegal arms.

“Both countries want to crush Hamas,” the official said. “But we need to be smart about it.”

Four Egyptian security officials told Reuters last week that Hamas was Egypt’s next target after quashing the Muslim Brotherhood. Egypt has in fact begun supporting subversive activities against the Hamas regime, the news agency reported.

Reacting to the increased pressure from both Israel and Egypt, Hamas may increase its missile attacks against the south of Israel, the Israeli official told The Times of Israel. In such a case, he added, Israel should be prudent and understand that a massive retaliation against the Gaza Strip will significantly hamper Egypt’s ability to curb terrorism on the Sinai-Gaza border.

The military appendix to the 1979 Camp David Peace Accords prohibits Egypt from sending military forces into the section of the Sinai Peninsula closest to the Israeli border. But in 2005, Israeli prime minister Ariel Sharon authorized the deployment of 750 Egyptian border patrol soldiers on the frontier with Gaza following the Israeli disengagement from the Strip.

Over the past two years, Israel has allowed Egypt to deploy both ground and air forces to northeastern Sinai to fight militant Islamists operating near the border with Gaza. Currently, 10 Egyptian brigades are active in Sinai, with Israel allowing Egypt to operate in the peninsula through amendments to the appendix renewed every month.

“In practice, the military appendix is nonexistent,” the official said.

The Israeli source spoke of “a sigh of relief” experienced by Egyptian officers since the ouster of Morsi in early July, and the feeling they can act more freely under the command of defense minister and de facto Egyptian ruler Abdel-Fattah el-Sissi.

Israel, for its part, has done its utmost to ensure Egypt’s army remains strong. It interceded with the American administration in October 2013 to continue funding the country’s military to the tune of $1.5 billion a year.

On the diplomatic level, the picture is more complex. Relations between Israel and Egypt are still considered too sensitive for a public meeting between the countries’ leaders. Yet the atmosphere behind the scenes has improved.

“Since July, there’s more willingness to speak to us. The tone has changed,” the official said.

With the beginning of operation Pillar of Defense in the Gaza Strip in November 2012, Egypt recalled its ambassador to Israel for consultations. Those “consultations” continue to this day. Israel has still not managed to locate a new building for its embassy in Cairo since it was ransacked by an angry mob in September 2011.

Egypt’s policy toward Israel is somewhat contradictory: It is softer on Israel at the UN, yet has blocked an Israeli bid to be accepted as observer in the African Union.           

Meanwhile, Egyptian prosecutors have added the indictment of “mocking the judiciary” to the three previous indictments against Morsi, namely escaping from prison in the early days of the revolution, conspiring with foreign elements and incitement to kill protesters.

But it is not only supporters of the Muslim Brotherhood who are being charged with “mocking the judiciary.” The list of accused includes liberal politician Amr Hamzawi, pan-Arab journalist Abdul Halim Qandil and firebrand media mogul Tawfiq Okasha.

Human rights organizations and opposition activists have warned of a significant regression in civil freedoms in the build-up to a referendum on Egypt’s new constitution last week.