Updated

Israeli officials are warily watching the mass protests in neighboring Egypt, fearing a collapse of the Islamist government could threaten the historic peace treaty between the two nations.

While Israeli leaders have been careful not to take sides in Egyptian President Mohammed Morsi's struggle with protesters, many fear extremist Islamic groups could take advantage of chaos to launch attacks from either Egypt or the Gaza Strip.

It is an ironic turn of events. The election of Morsi, a member of the anti-Israel Muslim Brotherhood, last year raised fears among Israeli leaders that Egypt would move to cancel the 1979 peace accord. Morsi's predecessor, Hosni Mubarak, carefully honored the peace deal and maintained close coordination with the Israeli military.

"Like everybody, we are watching very carefully what's happening in Egypt," Israeli Prime Minister Benjamin Netanyahu told the Italian newspaper Corriere Della Sera. "Remember that for 30 years now we have had an anchor of peace and stability in the Middle East, and that was the Egyptian-Israeli peace treaty. We hope that peace will be kept."

Morsi has been cool to Israel, but he has also shown himself to be surprisingly pragmatic. He has allowed military cooperation to continue and at times served as a moderating influence.

Egypt last year brokered a cease fire between Israel and Hamas militants in the Gaza Strip that ended eight days of rocket fire and airstrikes. More recently, the Egyptian military has cracked down on arms smuggling into the Hamas-ruled Gaza Strip.

The peace accord has allowed Israel's military to refocus its resources on volatile fronts with Lebanon, Syria and the Palestinians.

Israeli officials say security cooperation between the two armed forces is stronger than ever, due to the common threat posed by extremist Islamic groups. Jihadis have gained strength in Egypt's Sinai desert, and Palestinian militants in neighboring Gaza have moved between the two areas through illicit tunnels under the border.

Israeli military officials said Tuesday that Egypt has moved forces into the volatile border area near Gaza to help contain militant threats. It said the deployment was coordinated with Israel, as required by the peace treaty.

"The Egyptian military activity in Sinai is coordinated with Israeli security elements and authorized at the most senior levels in Israel, in order to contend with security threats in Sinai that pose a threat to both Israel and Egypt," the military said in a statement.

An Egyptian security official in the border area confirmed that about 50 tanks were deployed in the area overnight. He spoke on condition of anonymity because he was not authorized to talk to reporters.

Sami Abu Jazzar, a Gaza resident, said he could see Egyptian jeeps and armored vehicles across the border.

Israeli military officials say there have been no extraordinary troop movements on the Israeli side, but they are monitoring the situation. Besides the possibility that Islamic extremists might try to use the turmoil in Egypt to carry out attacks, there are also concerns that arms smuggling into Gaza could pick up.

The officials spoke on condition of anonymity because they were discussing a confidential security assessment.

Eli Shaked, a former ambassador to Egypt, said Israel can ill afford a new crisis at a time of instability across the region.

Israel has been concerned that it could be dragged into the civil war in neighboring Syria to the north. It is also watching the spillover of the Syrian conflict in Lebanon, where Hezbollah guerrillas have rallied behind Syrian President Bashar Assad, and Jordan, which is grappling with an influx of hundreds of thousands of Syrian refugees.

"Instability is bad for Israel. Instability is bad for the Middle East," he said.

Shaked said that despite Morsi's outward hostility toward Israel, he has respected the value of maintaining ties with Israel.

"Even with the extremists in power, they have shown they understand the value, or the interests of Egypt," he said. "Who is going to replace Morsi in case he is getting out? Is it going to be a personality who is going to unify the Egyptian people, and bring back stability? This is the huge enigma, the question mark."

Elie Podeh, a Hebrew University expert on Egypt, said Israel would want to preserve its ties with the Egyptian military regardless of who leads the country.

"What's best for Israel is to wait and see, not to interfere and not to support one side or the other, and let the Egyptian people determine what's best," he said.

___

Associated Press writers Ibrahim Barzak in Gaza City, Gaza Strip, and Max J. Rosenthal contributed to this report.