Israel is facing its worst crisis with Egypt for 30 years after being forced to airlift diplomats and their families to safety during the storming of its embassy in Cairo by a violent mob.

The siege of the embassy ended, with the 86 Israelis fleeing, only after intervention from the White House following phone calls between the Israeli prime minister, Binyamin Netanyahu, and US President Barack Obama.

The attack was the latest diplomatic storm to engulf the Jewish state, whose relations with another ally, Turkey, have worsened over the past nine days. Israel is also facing a "diplomatic tsunami" at the UN later this month when a majority of countries are expected to back recognition of a Palestinian state.

The embassy attack, in which a security wall was demolished and a group of protesters reached the door of the embassy's secure area, threatened to cause "serious damage in peaceful relations between our two countries", the prime minister said.

He added that it was a "grave violation of accepted diplomatic practice".

He spent the night with senior officials in a foreign ministry operation room dealing with the crisis. Eighty diplomats and their families were airlifted on an Israeli military plane at 4.40am, but six personnel were trapped inside the building.

"There was one door separating them from the mob," said the official, who described the night as "very dramatic and tense". Eventually the six were rescued by Egyptian commandos following behind-the-scenes intervention by the US.

Obama spoke to Netanyahu during the night, the White House said. He also appealed to Egypt to "honour its international obligations".

David Cameron condemned the attack and urged Egypt to meet its responsibilities under the Vienna Convention to protect diplomatic property and personnel.

Three people died during the overnight protests in Cairo and at least 1,093 were injured, according to Egypt's deputy health minister.

Anti-Israel sentiment in Egypt has been vociferous since the killing of five Egyptian soldiers by Israeli forces in the aftermath of a militant attack last month near the border between the two countries in which eight Israelis died. Thousands of people mobbed the Israeli embassy in Cairo, and Israel was forced to issue a statement regretting the deaths in the hope that it would contain the anti-Israel mood.

Israel has been nervous about the future of its peace treaty with Egypt, signed 30 years ago, since its staunch ally, former president Hosni Mubarak, was forced out of office in an uprising earlier this year. It fears the temporary military government is more attuned to anti-Israel sentiment on the street.

Israel is also deeply alarmed by its rapidly deteriorating relationship with Turkey, whose prime minister, Recep Tayyip Erdogan, is to visit Cairo amid fears that he will attempt to forge an anti-Israel alliance with the new Egyptian government.

"The situation with Turkey is not good, and the situation with Egypt is not good," said the Israeli official. "We hope this is not a sign of things to come."

Both Turkey and Egypt are supporting the bid to have a Palestinian state recognised at the UN general assembly. Israel is braced for what its defence minister, Ehud Barak, described as a "diplomatic tsunami".

The US – which has pledged to veto Palestinian statehood – is frantically trying to find a way of averting a vote, fearing further alienation within the Arab world. The Palestinian president, Mahmoud Abbas, said US efforts to encourage the parties to return to negotiations had come "too late".