JERUSALEM — Israel is quietly and carefully watching the turmoil in neighboring Egypt while maintaining close contacts with the Egyptian military amid concerns that the escalating crisis could weaken their common battle against Islamic militants in the Sinai Peninsula, officials said.
As the death toll in Egypt rises, this alliance has put Israel in a delicate position. Wary of being seen as taking sides in the Egyptian military’s standoff against Islamist supporters of the ousted president, Israel also needs the Egyptian army to maintain quiet along their shared border — and to preserve a historic peace treaty.
The 1979 peace treaty, Israel’s first with an Arab country, has been a cornerstone of regional security for decades. It has allowed Israel to divert resources to volatile fronts with Syria, Lebanon, and the Palestinian territories. For Egypt, it opened the way to billions of dollars in US military aid.
Although diplomatic relations have never been close, the two militaries have had a good working relationship. These ties have strengthened since longtime president Hosni Mubarak was ousted in a popular uprising 2½ years ago.
With both armies battling extremist jihadi groups near the Israeli border, Israeli security officials often say relations with their Egyptian counterparts are stronger than ever.
With so much at stake, Israel has remained quiet since the Egyptian military ousted Mubarak’s successor, Mohammed Morsi, on July 3. Morsi, who became Egypt’s first democratically elected president, hails from the Muslim Brotherhood, an Islamist group considered the parent organization of Hamas, which rules the Gaza Strip and is an enemy of Israel.
Israel has not commented on the past week’s bloodshed, in which Egyptian troops killed hundreds of Morsi’s supporters who were rallying against the coup.
‘‘Israel does not have to support the [Egyptian] regime, especially not publicly. It is not our place to defend all the measures taken, this is not our business,’’ said Giora Eiland, a former chairman of Israel’s National Security Council.
At the same time, Eiland suggested that international condemnations of the Egyptian military’s actions have been excessive. He said Israeli and Western interests are ‘‘much closer’’ to the interests of Egypt’s General Abdel-Fatah el-Sissi and his secular allies.
‘‘Even if we don’t share the same values, we can share the same interests,’’ he said. ‘‘The Israeli interest is quite clear. We want a stable regime in Egypt.’’
Prime Minister Benjamin Netanyahu’s office declined to comment but Israeli defense officials confirmed that security cooperation with Egypt has continued over the past week.
The Israeli and Egyptian armies have worked closely in recent years to contain the common threat posed by Al Qaeda-linked groups operating in Sinai. These groups have stepped up their activities since Mubarak was toppled.
Under the terms of the peace accord, Egypt must coordinate its military operations in northern Sinai with Israel. The Israelis are believed to have granted every request by Egypt to bring additional forces into the region, as long as all operations were closely coordinated. An international force helps monitor the terms of the treaty.
The United States and European Union have criticized Egypt’s crackdown on Morsi’s supporters. President Obama has suspended a planned military exercise with Egypt, and Senator John McCain has led a chorus of voices urging a halt in military aid to Egypt.