Calling the unrest an "attack on Egypt's image," he said "it is clear that the behaviour of certain people menaces the Egyptian state in its entirety" and that "exceptional circumstances demand decisive judicial measures."
Consequently, the "security forces will have recourse to all necessary measures, including the right to legitimate self-defence, to preserve the security of the homeland."
He also said Cairo would apply "all articles" of an emergency law in force for 30 years that provides greater powers to the judiciary and police.
And he affirmed Egypt's "total commitment to respecting international conventions, including the protection of all (diplomatic) missions."
In Jerusalem, the Israeli government said Ambassador Yitzhak Levanon would return to Egypt only after security could be guaranteed.
Levanon, other staff and dependants had all left Egypt but the deputy ambassador stayed behind to remain in contact with the Egyptian government, an official told AFP in Jerusalem.
He said six embassy staff were plucked to safety by Egyptian commandos.
"It was a painful blow to the peace between us and a grave violation of diplomatic norms," the official said.
The attack was the worst since Israel established its mission in Egypt after it became the first Arab country to sign a peace treaty with the Jewish state in 1979.
It was also the worst episode in tense relations since the killing of five Egyptian policemen last month on the border as Israel hunted militants after a deadly attack.
Three people were killed in the overnight clashes between police and protesters, hospital sources said, and the health ministry said one person died of a heart attack.
More than 1,000 people, including some 300 policemen, were also injured in the clashes that continued overnight, medical and security sources said.
Police also arrested 19 people and referred them to the military prosecution which immediately began interrogating them, a security official said.
Protesters demolished a security wall around the mission with sledge-hammers, removed the Israeli flag and entered the embassy, grabbing thousands of documents.
They also torched police trucks and attacked the Giza police headquarters, and dumped documents in Arabic, English and Hebrew, bearing watermarks of the embassy, to people on the streets who jostled to grab them like trophies.
Hundreds of soldiers backed by armoured cars rushed to the area after US President Barack Obama called on Cairo to protect the embassy.
Interior Minister Mansur al-Eissawy declared a state of high alert, cancelling all police leave, while Prime Minister Essam Sharaf called for an emergency cabinet meeting on Saturday.
The attack came after about 1,000 protesters marched from Tahrir Square where thousands had massed Friday to press Egypt's military rulers to keep promises of reform after a January-February revolt ousted president Hosni Mubarak.
Israeli Defence Minister Ehud Barak's office said he called US Defence Secretary Leon Panetta to request help protecting their embassy.
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.
Ynet news website quoted Netanyahu as saying "the mob attack on the Israeli embassy is a serious incident but could have been worse had the rioters managed to get through the last door and hurt our people."
Israeli public radio said the six rescued men were security officers, and Netanyahu's office said they had returned home safe.
"When the violence got out of hand, some 80 (Israelis) were taken out" of Egypt, an Israeli official said. "All our people are safe and sound."
Speaking in Washington, State Department spokeswoman Victoria Nuland said "we are relieved that no embassy personnel were injured.
"We have been in contact with the Egyptian and Israeli governments about this serious incident," and Secretary of State Hillary Clinton has "reached out" to Egyptian Foreign Minister Mohammed Amr to highlight US concerns, Nuland added.
"Israel and Egypt are key partners and allies of the United States, and both states have made clear their continuing commitment to maintain their bilateral relationship and the peace treaty between them, which remains a cornerstone of regional stability," Nuland said.
"We remain strongly committed to doing all we can to support this relationship."
Egyptian state television said that Levanon met a general of the ruling military's Supreme Council of the Armed Forces before leaving Cairo, and that the ambassador appeared "anxious and even scared."
Last month, Egypt asked for an official apology from Israel following the August 18 killing of five policemen along the border, deaths that triggered huge protests outside the embassy.
Activists have called for a revision of the 1979 peace treaty with Israel since Mubarak's ouster in February.