The prize for most conspicuous acrobatic performance on a jittery weekend goes to Ahmed el-Shahat, the Egyptian who scaled the 20-story Cairo tower that holds the embassy of Israel in relative safety above a city unenamored of the Jewish state. The young man scrambled to the flagpole and pulled down the Star of David to the cheers of the hundreds gathered below.  The showmanship upstaged another balancing act, one characterized not by theatrics but by intense concentration and attention to the smallest changes in wind. In Jerusalem, the government of Benjamin Netanyahu was on the high wire, gingerly calibrating crucial distinctions between vengeance and restraint, indulgence and deterrence. In the wake of any terrorist attack, Israeli governments struggle to maintain their footing, but after the Arab Spring, everything got more dramatic. A missed step can mean plunging a lot farther, and you might not be certain what you're tethered to. (See pictures of Israelis clashing with Palestinians.)  "The political and strategic architecture of the Middle East has changed," says Shalom Harari, a former Israeli intelligence specialist in Arab affairs. "For Israel, it's very important to keep relations with Egypt  or what's left of relations with Egypt."  The crisis began Thursday, Aug. 18, with a multilayered, sustained terrorist attack on a desert highway along Israel's border with Egypt. The ambush by Palestinian militants left eight Israelis dead; the following day, Egypt claimed casualties too. Cairo complained that three of its police officers were killed  allegedly cut down by Israeli troops pursuing the attackers (some of whom may have dressed in Egyptian military uniforms). The emergence of an Egyptian death count, later raised to five, transformed the worst terrorist attack during Netanyahu's term into Israel's most severe test of relations with Egypt since the fall of Hosni Mubarak.  By Saturday, Cairo was announcing the recall of its ambassador to Israel. "Israel has to realize that the days in which our sons are killed without an appropriate and strong reaction are forever gone," Amr Moussa, the former Foreign Minister and a leading presidential prospect, wrote on his personal Twitter account. Alarmed, the Israeli Defense Ministry took the unusual step of breaking the Jewish Sabbath to issue a statement of regret for the Egyptian deaths. Egypt's state news agency soon confirmed the existence of a joint investigation into the incident, a deflection framed as "a fundamental step to prevent the occurrence of such accidents, as Egyptian blood is not cheap and the government will not accept that Egyptian blood gets shed for nothing." (See pictures of life under Hamas in Gaza.)  The cooler heads were quickly identified as the generals who still rule Egypt and value the 1979 peace treaty with Israel over an Egyptian population that, 30 years into a "cold peace," remains acutely hostile to the Jewish state. Israeli leaders are only too aware of what might follow the removal of the uniformed buffer that has assumed Mubarak's position between the people's passions and public policy. Jerusalem dispatched a major general to Cairo to smooth matters with the Supreme Military Council.  "This is the party with whom Israel is doing business," says Uri Ne'eman, a former research director for Mossad, which had regular contacts with Mubarak's intelligence service aimed at suppressing Islamist militants. "The good part of it is, this leadership in Egypt is a rational one ... It is in the very deep interest of Israel and Egypt to try and calm things down."  Working diligently against calm, however, is a familiar dynamic in the Gaza Strip. The highway attack was apparently carried out by Palestinian militants from the coastal enclave, who traveled by tunnels into an Egyptian desert left largely unpoliced since Mubarak's fall and made their way down the Sinai peninsula to Israel's vulnerable border, where they planted roadside bombs and set up firing positions. Israeli intelligence had known of the plot, but if foreknowledge failed to prevent the attack, it at least assured that retribution would be swift. After a dusk air strike on the Rafah headquarters of a group called the Popular Resistance Committees, Netanyahu was able to dryly note in a prime-time television address that "those who gave the order to murder our citizens while hiding in Gaza are no longer among the living."  At that point a familiar rhythm kicked in. The Israeli air strike was answered by rockets, with militants inside Gaza launching 100 missiles and mortars toward the Israeli countryside and cities over three days. Israel answered with more air strikes on Gaza targets. Each explosion brought pressure to each side to retaliate in earnest. On the Israeli side, up to a million civilians within missile range scrambled into bomb shelters when warning sirens sounded. The danger was reduced by a missile-interception system called Iron Dome, which through Sunday knocked down 20 of the most threatening missiles. But one rocket got past and killed a man in Beersheba who had stepped outside to watch the missile shield work. Prominent members of the opposition called for a new ground assault, invoking the deterrence value of the December 2008 campaign that killed 1,400 Palestinians. (See Israel's thinkers discussing the country's challenges over the next 60 years.)  Inside Gaza, meanwhile, the ruling Hamas Party vacillated between tough talk and appeals for a cease-fire. Hamas had no clear role in the desert attack, and its political wing, at least, has incentives to keep its powder dry. The organization's alliances with Syria and Iran are doing little to endear it to a population inspired by the Arab Spring, and the government it is turning to  Egypt  wants a quiet border with Israel.  Still, Hamas means Islamic Resistance Movement, and some in the group want to live up to the name. Claims were posted that Hamas launched its share of rockets, and in Jerusalem, an alert went out with rumors of another terrorist attack. That may explain the arrests of more than 100 Hamas members on the West Bank over the weekend.  Through it all, Israeli officials counseled restraint. A cease-fire set to begin at 9 p.m. Sunday brought no pause in the rockets. Netanyahu's Security Cabinet met at 3 a.m. Monday; Israeli forces targeted only militants caught in the act of launching weapons. The morning paper quoted a senior diplomatic official: "We must not lose Egypt because of one terror attack."  With reporting by Abigail Hauslohner/Cairo and Aaron J. Klein/Ashkelon  See TIME's special report "The Middle East in Revolt."
A sudden crisis in relations emerges after Israeli retaliation for a terrorist attack inadvertently kills five Egyptian soldiers