Cairo (CNN) -- Egypt's military leaders on Saturday promised to re-establish order, a day after an attack on the Israeli Embassy heightened tensions in Egypt and Israel.
Officials reactivated the country's emergency law, according to Mohamed Hegazy, spokesman for the prime minister. The move makes it easier for authorities to arrest people and requires protesters to seek permission to demonstrate, according to a senior official in the National Security Directorate, who spoke to CNN on the condition of anonymity.
The law was revived to "protect the peace and national security of the country," the official said.
The government also vowed to try those responsible for the attack on the Israeli Embassy, which pushed Israel to withdraw its diplomatic personnel from Egypt, Hegazy said.
Egyptian Prime Minister Essam Sharaf offered to step down in the wake of the violence, but his resignation was refused, according to a government source not authorized to talk to the media about the matter.
Early Saturday, streets in Cairo looked like a war zone as violence intensified between security forces and protesters. Gunfire pierced the air as rocks, burning tires and fires from Molotov cocktails littered the streets.
The turmoil left three dead and 1,049 injured, the Egyptian Health Ministry said, according to the the state-sponsored Al-Ahram newspaper.
The Giza police station next to the Israeli Embassy and several police vehicles were set on fire, Al-Ahram reported.
After the incident, Israeli Prime Minister Benjamin Netanyahu said Israel will stick to its peace agreement with Egypt.
"We will continue to keep our peace with Egypt. It is a mutual interest of both countries to do so," he said.
Netanyahu also thanked U.S. President Barack Obama for his support and influence on the safe rescue of embassy staff members.
"We are working with the Egyptian government to bring our ambassador back to Cairo," he said.
A senior Israeli government official expressed relief late Saturday that the violence had largely subsided.
"A very difficult event is over," said the official, who was not authorized to speak publicly.
The official said that while Israelis are thankful to the Egyptians for their efforts to resolve the situation, "it cannot be brushed under the carpet. This was a serious violation of the conventions of diplomatic behavior."
The official added that American involvement in speaking with Egyptians about the situation was crucial.
A spokeswoman for the U.S. State Department called both Israel and Egypt "key partners" of the United States.
"We underscore the need for the Egyptian government to meet its obligations under the Vienna Conventions to safeguard the security of all foreign missions in Egypt," said Victoria Nuland in Washington.
The Israeli ambassador to Egypt left for Tel Aviv amid the violence early Saturday, along with members of his family and staff as well as security guards, said Egyptian Army Lt. Col. Amr Imam.
All diplomatic personnel from the Israeli Embassy have either left or were in the process of leaving, the Israeli official said.
But one Israeli diplomat -- a deputy ambassador -- will stay in a secure location in Egypt because Israel wants to maintain a diplomatic presence in the country, he said.
U.S. Defense Secretary Leon Panetta spoke to Field Marshal Mohamed Hussein Tantawi, head of Egypt's Supreme Council of the Armed Forces, late Friday to encourage Cairo to take steps to protect the Israeli embassy, a senior U.S. defense official told CNN. Tantawi pledged to take those steps, the official said.
Egyptian protesters tore down a wall surrounding the building that houses the Israeli Embassy and entered its offices on Friday. Once inside, the protesters threw papers bearing Hebrew from the windows and into the streets.
Initially, police and military forces took no action as demonstrators destroyed the wall that had protected the high-rise building. Israeli Foreign Ministry spokesman Yigal Palmor said about 3,000 protesters had torn apart the wall.
An Egyptian commander at the embassy told CNN that security personnel had been ordered to avoid confrontations with protesters.
Police had been guarding the entrance to the building, which houses the embassy on the 12th floor and private dwellings on other floors.
The commander said the wall had been erected recently to protect the residents, not the Israeli Embassy.
Protesters cheered the demolition and chanted for the ouster of Israel's ambassador.
"There was a real concern for the lives of six embassy personnel who were trapped inside the embassy during the course of the attack," the Israeli official said. The six Israelis were able to escape after an Egyptian military operation and arrived in Israel on Saturday, officials said.
Since the revolution that ousted President Hosni Mubarak in February, many Egyptians have taken to the streets to call for the end of diplomatic relations with the Jewish state. The two nations signed a peace treaty in 1979.
Egyptians have been angry about the killing of five Egyptian police officers by Israeli soldiers last month when Israel went after militants who had attacked civilians near the Israeli-Egyptian border.
"It's very serious as a symbol of what people feel all over the Arab world and as a practical manifestation of how Arab public opinion is going to kick in very quickly once Arab countries democratize," said political analyst Rami Khouri, director of the Fares Institute for Public Policy and International Affairs at the American University of Beirut.
"And when you get Arab public opinion expressing itself in policy terms, it's going to mean more pressure on Israel, more standing up to the West and the U.S. and others -- and no pussyfooting around."
The demonstrators were among thousands of Egyptians who took to the streets Friday.
Many protesters converged on Cairo's Tahrir Square to demand reforms in a turnout they had dubbed "correcting the path of the revolution."
Protesters at the square criticized the performance of the Supreme Council of the Armed Forces and the government in the wake of Mubarak's ouster. They want the abolishment of military tribunals, the establishment of minimum and maximum wages, permission for Egyptians abroad to vote in the coming elections and the announcement of dates for those elections.
Protesters are also calling for the removal of former ruling party members from banks, schools, universities and government institutions.
Mubarak is charged with corruption as well as ordering the killing of protesters to quash the uprising that ultimately ended his 30-year rule. He has pleaded not guilty to the charges.
CNN's Ivan Watson, Guy Azriel, Kevin Flower and Karen Smith contributed to this report.