CAIRO – Israel and Egypt’s leadership tried Saturday to limit the damage in ties after protesters stormed Israel’s embassy in Cairo, trashing offices and prompting the evacuation of nearly the entire staff from Egypt in the worst crisis between the countries since their 1979 peace treaty.

The 13-hour rampage deepened Israel’s fears that it is growing isolated amid the Arab world’s uprisings and, in particular, that Egypt is turning steadily against it after the fall of Hosni Mubarak, the authoritarian leader and close ally.

In Israelis’ eyes, the scene of cars burning outside the embassy and the tale of six Israeli guards trapped inside for hours in a steel-doored safe room underscored their view that anti-Israeli sentiment in Egypt was running free after decades of being contained by Mubarak’s regime. The ousted leader’s powerful security forces never would have let a protest get near the Nile-side embassy.

Egypt’s new military rulers, in turn, appear caught between preserving crucial ties to Israel — which guarantee them billions in U.S. military aid — and pressure from the Egyptian public. Many Egyptians are demanding an end to what they see as too cozy a relationship under Mubarak, who they feel knuckled under to Israel and the United States, doing nothing to pressure for concessions to the Palestinians.

POLICE STOOD BY

Egyptian security forces did nothing as hundreds of protesters massed Friday outside the high rise residential building where the Israeli Embassy is located and tore down a concrete security wall.

Many protesters saw the wall as a symbol of the government’s willingness to protect Israelis but not Egyptians, since it was put up just weeks ago to keep back protests after Israeli forces chasing militants accidentally killed five Egyptian soldiers in the Sinai Peninsula.

Police and military also did little initially when, after nightfall, around 30 protesters climbed in a third-story window and raced up to the embassy floors, broke into an office and began throwing Hebrew-language documents to the crowd below. Police finally managed to clear them out early Saturday.

Israeli calls to President Obama brought U.S. intercession to help ease the violence.

An Egyptian security official said the ruling military did not order the police to clamp down on the protests outside in order to “avoid a massacre.” They couldn’t move more quickly to clear out protesters inside the embassy because the crowd outside “considered them heroes,” he said.

NO CONDEMNATIONS

But in a Saturday evening television address, Israeli Prime Minister Benjamin Netanyahu avoided any condemnations and instead stressed the need to maintain its strategic relationship with Egypt, whose peace with Israel — though sometimes chilly — has been a vital peg of stability for the Jewish state.

He thanked Egyptian commandos for rescuing the six trapped guards, saying they “prevented a tragedy,” and stressed that Israeli officials had been in touch with Egyptian counterparts throughout the unrest.

Still, he and his foreign minister, Avigdor Lieberman, hinted that American intervention prompted Egyptian authorities to act. Both profusely thanked Obama for helping.

“He said he would do everything he could to help and he did so. He deployed all means and influence, and I think we owe him a special thank you,” Netanyahu said.

Lieberman said that “without elaborating, the U.S. representatives did extraordinary work and they deserve the credit.”

From the Egyptian side, the ruling military council and civilian government underlined in a statement read on state TV that Egypt is committed to international conventions and the protection of diplomatic missions.

Egyptian officials said that 38 people arrested in the violence would face “immediate prosecution” in the attack.

They also vowed to crack down on future protests at the embassy. To “safeguard the state,” they said they would re-invigorate parts of hated emergency laws, which for months the military has promised to abolish in a concession to demands for reform.

— McClatchy Newspapers contributed to this report.