Since the March 1979 Egyptian-Israeli peace treaty, a stable relationship with Egypt has been a pillar of Israel’s security doctrine and the West’s regional strategy. That pillar now appears shaky.

The current crisis began on Aug. 18 when about 20 Palestinian terrorists crossed into Egypt’s Sinai Peninsula from the Gaza Strip, and traveled south along the border with Israel. After entering the country, they killed eight Israelis. The Israeli military chased the attackers into Egypt, where three local police officers died in the crossfire.

Under former President Hosni Mubarak, Egypt would probably have protested privately, and not allowed the incident to escalate. Mubarak shared Israel’s concern over Islamic extremism, distrust of the Palestinian leadership and antipathy toward Iran. He also understood that the U.S. Congress viewed stable relations with Israel as necessary to keeping economic and military aid flowing. His regime worked with Israel to weaken the Hamas government in the Gaza Strip, which lies between the two countries; played a helpful role in the Israeli-Palestinian peace process; and sought to diminish Iranian influence in the region. But this is a new Egypt, and Israel has to get used to it.

Mubarak’s fall has forced Israel to begin thinking of the implications of a less cooperative government in Cairo. The Supreme Council of the Armed Forces, which currently rules the country, wants to return to its barracks as quickly as possible while retaining its privileged position in Egyptian society. To do so, it must get demonstrators off the streets, restore stability, and hold credible elections as soon as possible. So, for the first time in Egypt’s recent history, the government must take public opinion into account to avoid protests.

Although the demonstrations that took down the president were virtually free of anti-Israeli signs or slogans, Egypt’s Mubarak-era cooperation with Israel was intensely unpopular. For many Egyptians, the deaths of the three policemen required a strong response from their government, if only to differentiate it from the Mubarak regime. As Amre Moussa, a former Egyptian foreign minister and likely presidential candidate wrote on his Twitter account, “Israel has to realize that the days in which our sons are killed without an appropriate and strong reaction are forever gone.”

But both sides have an interest in preventing their relationship from unraveling. So after a few tense days, both have tried to defuse the crisis. On Aug. 20, Israeli Defense Minister Ehud Barak issued a statement expressing “regret.” When the Egyptian Cabinet said that wasn’t sufficient, Israeli President Shimon Peres put out a statement of his own. The Egyptians have said they will accept Israel’s offer to jointly investigate the incident and have backed away from a report on their state television channel that the ambassador to Israel will be recalled. Most importantly, the Egyptians pressured Hamas to stop firing rockets into Israel and announced plans to bring order to the Sinai border region, which Israel fears is becoming a base for Islamic extremists.

But the probability of another crisis between Egypt and Israel is high. Each side is suspicious of the other, partly because it is still relatively easy for Gaza-based terrorists to enter Israel from Sinai. Hamas and its Iranian patrons would like nothing more than to precipitate an Israeli-Egyptian confrontation that would embarrass moderates in the region and end any hope of reviving the Israeli-Palestinian peace process.

The “Quartet” -- the U.S., the European Union, Russia and the United Nations -- has taken the lead on peace-process issues on behalf of the international community. If terrorists’ infiltrating Israel from Sinai is the most likely cause of another confrontation, the Quartet should act now to help seal the border. Israel has begun building a security fence along its boundary with Egypt that would make it much more difficult to enter from Sinai, but construction has been slowed by budgetary constraints. The Quartet should help the Israelis finish the fence as quickly as possible.

The Israelis also need to be told that they must do more to accommodate the new reality in Egypt. An immediate and sincere Israeli apology might have nipped this crisis in the bud.

The group of four should also encourage the Egyptians to use part of the financial and military assistance they receive to regain control of Sinai. Especially useful would be a jobs program for Sinai’s indigenous Bedouin tribes and equipment to help the Egyptian military find and destroy the tunnels that Hamas has built into Sinai from Gaza. The Quartet should also bluntly tell the Egyptian military, and its budding political leadership, that any attempt to court public opinion by renouncing the peace treaty with Israel will lead to an immediate termination of funding.

We still believe that in the long run, a more democratic Egypt will benefit Israel, the U.S. and Europe. Unfortunately, governments in the Middle East are almost always focused on the short term. The Quartet can help by acting to prevent the next Egyptian-Israeli crisis before it starts.

To contact the Bloomberg View editorial board: view@bloomberg.net.