Anxious to head off a diplomatic crisis with Egypt, Israeli Defense Minister Ehud Barak issued a statement Saturday expressing regret for the deaths of Egyptian security personnel in a border incident following a deadly raid in Israel. It also promised a joint investigation of the incident and commended Egypt’s conduct in the relationship with Israel.

The multiple attacks Thursday north of the Red Sea resort of Eilat were the deadliest such incident in Israel in three years and threatened to ignite a new round of hostilities across the Israel-Gaza border after months of relative calm, as well as straining Israeli-Egyptian ties.

The Egyptian government had demanded an Israeli apology for and joint investigation into the border skirmish, in which an Egyptian military officer and two policemen were killed. It had also criticized statements by Israeli officials about Egypt after the attack in southern Israel, which killed eight people. Barak said at the time that Egypt’s hold on the Sinai Peninsula, from where the gunmen are believed to have infiltrated Israel, had weakened.

“Israel regrets the death of the Egyptian policemen during the attack on the Israeli-Egyptian border,” Barak said in a statement released by his office. The statement added that Barak had ordered a military investigation of the incident in which the Egyptian personnel were killed, followed by a joint probe with the Egyptian army to clarify what had happened and draw the “appropriate conclusions.”

The statement did not acknowledge Israeli responsibility for the deaths.

On Friday, militants in the Gaza Strip fired rockets into Israel and Israeli aircraft carried out deadly strikes across the coastal territory in a surge of cross-border violence after the Thursday attacks.

Responsibility for the rocket firings was asserted by the Popular Resistance Committees (PRC), a militant group in Gaza whose leaders were killed Thursday evening in a retaliatory airstrike by Israel.

Prime Minister Benjamin Netanyahu accused the group of planning the attacks near Eilat, which Israeli officials said were carried out by gunmen from Gaza who had infiltrated Israel from Egypt’s Sinai Peninsula, an assertion denied by Egyptian officials.

The killings of the PRC leaders were “just the first response,” Netanyahu said Friday while visiting soldiers wounded in Thursday’s attacks. “We have a policy of exacting a very high price from those who harm us. and this policy is being applied in practice on the ground.

The Israeli airstrikes Friday killed eight Palestinians and wounded 40, according to Gaza’s emergency services. Medical officials said the dead included two boys, ages 5 and 13, and three were identified as militants.

In one strike in Gaza City, a leader of the armed wing of the Islamic Jihad group was killed along with his son and brother as they rode a motor scooter, Palestinians reported from the scene.

The Israeli army said it had struck rocket-launching squads in several locations.

The airborne attacks also targeted security posts of Hamas, the Islamist group that rules the Gaza Strip, as well as smuggling tunnels under the border with Egypt and what the army said were weapons manufacturing sites.

An army statement said that the military held Hamas “responsible for any terrorist activity emanating from the Gaza Strip.”

The office of Ismail Haniyeh, the Hamas prime minister in Gaza, said he had contacted Egyptian and U.N. officials, as well as Arab League Secretary General Nabil Elaraby, in an effort to halt the Israeli strikes.

In the southern Israeli city of Ashdod on Friday, a rocket hit a religious seminary, seriously wounding two people, medical officials said, and another rocket struck a synagogue. The army said that three rockets fired at the coastal city of Ashkelon were intercepted by the military’s Iron Dome antimissile system and that a rocket landed outside the southern city of Beersheba, causing no casualties.

Radio announcements instructed residents of southern communities how to respond in the event of rocket attacks, and large gatherings were banned, in expectation of further strikes.

In Cairo, meanwhile, hundreds of people gathered outside the Israeli Embassy in Cairo to demand the ambassador’s removal. Protesters stayed outside the embassy through the night, their number swelling to more than 1,000 . Some volunteered to serve in the Egyptian army to fight Israel, chanting, “To Sinai we go by the million. Generation after generation, Israel is our enemy,” and, “You ambassador of the pigs, get out of the land of Nile.”

Egypt’s prime minister, Essam Sharaf, wrote on his official Facebook page: “Our glorious revolution started so that Egyptians’ dignity is restored inside and out. What was acceptable in Egypt before the revolution will not be acceptable after the revolution.” Late Friday night, the Egyptian government summoned the Israeli ambassador to appear before them to demand an apology, according to the cabinet’s Facebook page.

Early Saturday, Egyptian state television reported that the Egyptian cabinet would withdraw its ambassador from Israel until Israel investigated the incident. The cabinet later backtracked from that threat, the Associated Press reported.

The statement released by the Israeli defense minister’s office said that Barak “noted the importance of the peace with Egypt and our appreciation for the judgement and responsibility shown by Egypt.”

It quoted Barak as saying that “the peace treaty between Israel and Egypt has much importance and great strategic value for the stability of the Middle East.”

Earlier, Amos Gilad, a top Israeli Defense Ministry official, said that it remained unclear whether the Egyptian fatalities were caused by Israeli fire or the gunmen who had attacked in Israel.

“No one in Israel wants to harm Egyptian soldiers and policemen,” Gilad told Israel Radio. “No soldier consciously aims at Egyptian soldiers and police.”

“The army returned fire to sources of shooting and murderers who wanted to kill civilians,” Gilad added. “It all has to be checked thoroughly and professionally.”

Analysts said the border incident would make it harder for the interim military leadership in Cairo to maintain Egypt’s 1979 peace treaty with Israel.

Egypt is ruled by military people whose basic function is to protect the country. So When three soldiers are killed, including an officer, this is extremely embarrassing,” said Mustafa Kamel el-Sayed, a political science professor at Cairo University. “This will fuel angry feelings against Israel and against the maintenance of the peace treaty.”

Abdel Moneim Abou el-Fatouh, a moderate Islamist who broke with the Muslim Brotherhood after announcing a plan to run for president, posted a statement on his Web site Friday implying Israel had perpetrated an act of war.

“The Israeli enemy must realize that Egyptian blood is the most valuable thing we have, and all agreements and accords are not worth the ink that they were signed with if the blood of our citizens was shed or our borders were violated,” the statement said.

Fadel reported from Cairo. Special correspondent Islam Abdel Kareem in Gaza contributed to this report.