Israel's defence minister has expressed regret for the deaths of Egyptian security forces killed this week during a shootout between Israeli soldiers and suspected Palestinian militants.

Ehud Barak said Saturday he has ordered a military investigation and a joint inquiry with the Egyptian army to clarify the circumstances of Thursday's incident as Israeli soldiers fired across the Israel-Egypt border.

The investigation was promised shortly after Egypt announced it's recalling its ambassador to Israel as an official protest.

"We regret the deaths of members of the Egyptian security forces during the terror attack on the Israeli-Egyptian border," Barak said in a statement.

"The Israel-Egypt Peace Treaty has great importance and much strategic value for the stability of the Middle East," he added.

The Egyptian government said late Saturday Israel's apology was welcome, but not enough. Still, it reaffirmed Egypt's commitment to the peace.

The Egyptian cabinet said earlier that ambassador Yasser Reda would be withdrawn until Israel concludes its investigation into the deaths. The Egyptian consulate in the West Bank city of Ramallah told the CBC's Derek Stoffel that Egypt was recalling its ambassador, but Reda had not left Israel yet.

The five Egyptian security forces were reportedly caught in a firefight between Israeli troops and Palestinian militants.

Israel officials were hunting for gunmen who attacked buses near the Israeli Red Sea resort of Eilat. The ambush left eight Israelis dead and dozens injured and was blamed on militants who entered Israel through the Sinai peninsula, which borders both Israel and the Hamas-ruled Gaza Strip.

The diplomatic slap marked the first time in nearly 11 years that Egypt decided to withdraw its ambassador from Israel. The last time was in November 2000 when the Egyptians protested what they called excessive use of violence during the second Palestinian uprising.

Egypt holds Israel 'politically and legally responsible'

A statement released by the Egyptian cabinet said Egypt holds Israel "politically and legally responsible" for the border shootings that followed, adding that what happened was in violation of the 1979 Egyptian-Israeli peace treaty.

The cabinet statement said Egypt would send reinforcements to protect its borders and "respond to any Israeli military activity at the Egyptian borders."

Amos Gilad, a senior Israeli defence ministry official, said the Israeli military did not intend to harm Egyptian security personnel.

"The question is what happened in the field and that is what is being investigated," he told Israel Radio.

Meanwhile on Saturday, thousands of protesters gathered outside the Israeli Embassy in Cairo for a second day, demanding the expulsion of the Israeli envoy. A Palestinian flag was unfurled at the site, and some of the demonstrators threw firecrackers at the building.

Some protesters removed concrete blocks from the entrance of a side street leading to the embassy while others banged on a metal fence with bars, but no violence was reported.

With files from Derek Stoffel and The Associated Press