Egypt declared a state of alert Saturday after protesters stormed the building housing Israel's embassy and clashed with police, and Israel said six staff were plucked to safety by Egyptian commandos.
The violence prompted Israeli Ambassador Yitzhak Levanon to leave Cairo, but a senior Israeli official said the deputy chief of mission would remain for the time being "to keep contact with the Egyptian government."
The attack on the embassy was the worst since Israel set up its mission in Egypt after it became the first Arab country to sign a peace treaty with Israel in 1979.
The violence is also the worst episode in tense relations between Egypt and Israel since the killing of five Egyptian policemen last month in Sinai, close to the border with Israel.
Hundreds of police backed by armoured cars were rushed to the embassy district after US President President Barack Obama called on Egypt to protect the embassy.
Protesters demolished the security wall outside the mission with sledgehammers and later torched police trucks and attacked regional police headquarters.
They also dumped thousands of Israeli embassy documents from the building after they took down its flag and threw it to the crowd.
Interior Minister Mansur El-Eissawy declared a state of high alert and the government announced it was convening an emergency meeting on the crisis.
Troops and police were deployed in force around the embassy which overlooks a bridge spanning the Nile near Cairo University in the Giza district.
About 30 anti-riot police trucks and armoured vehicles were parked in the area of the embassy where streets were strewn with rocks and broken glass from the overnight violence, an AFP reporter said.
Some roads leading to the embassy and Giza police station were blocked.
Early on Saturday, Israel's envoy flew out to Israel, sources at Cairo airport told AFP.
In Jerusalem an Israeli official confirmed that Ambassador Levanon, other staff and dependants had left Egypt but added that the deputy chief of mission was still in Cairo.
"We left the deputy ambassador to keep up contact with the Egyptian government," the official told AFP on condition of anonymity.
"When the violence got out of hand, some 80 (Israelis) were taken out" of Egypt, he said. "All our people are safe and sound."
The official also reported that six people had been trapped in the embassy but "in the end they were successfully rescued by Egyptian commandos." Israeli public radio said the six men were security officers.
Prime Minister Benjamin Netanyahu's office said in a brief statement on Saturday morning that the six had also arrived back in Israel and were well.
Egyptian state television earlier reported that Levanon met a general of the ruling military's Supreme Council of the Armed Forces before leaving, and that the ambassador appeared "anxious and even scared."
Levanon had only recently returned to Cairo from holidaying in Israel as protests raged outside the embassy since last month.
Obama spoke to Netanyahu by phone and expressed "great concern about the situation at the embassy, and the security of the Israelis serving there," the White House said.
Israeli Defence Minister Ehud Barak called US Defence Secretary Leon Panetta early on Saturday to request help protecting their embassy in Cairo, his office said.
Protesters played cat-and-mouse with police throughout the night, amid clouds of tear gas and smoke from burning tyres.
They dumped documents in Arabic, English and Hebrew, bearing watermarks of the embassy, to thousands of people on the streets who jostled to grab them like trophies.
The documents ranged from requests to Egyptian authorities for weapons permits for embassy security to internal correspondence about holidays.
State television quoted an interior ministry official as saying that "foreign hands" were behind the violence.
Earlier on Friday, thousands of protesters had massed in Tahrir Square to demand reforms and about 1,000 people left the square and marched to the embassy.
Egypt last month asked for an official apology from Israel following the 18 August killing of five policemen along the border, deaths that triggered huge protests outside the embassy.
Since president Hosni Mubarak's ouster in February after a popular revolt, activists have called for a revision of the peace treaty.