JERUSALEM - The death of Egyptian soldiers caught in a battle between Israeli troops and Palestinian militants is testing the two nations' landmark 1979 peace treaty, just as a sudden spike in violence Saturday threatened to trigger a full-scale conflict between Israel and Gaza militants.

Palestinians have pelted southern Israel with at least 80 rockets and mortars since Friday, killing an Israeli on Saturday in the desert city of Beersheba, about 25 miles (40 kilometres) from Gaza. Dozens of Israelis were wounded in the barrage, including a 2-week-old baby, hospital officials said. The flurry of exploding rockets damaged buildings all over Israel's south.

It was the heaviest salvo of rockets from Gaza since Israel staged an all-out ground and air operation in Gaza to stop daily rocket attacks in early 2009.

The attack that triggered the double crisis saw heavily armed militants ambushing Israeli buses and cars with gunfire and a bomb along the Egyptian border Thursday. The Egyptian soldiers were apparently killed during the firefight between fleeing militants and Israeli forces.

Israel issued a rare apology for the deaths. "Israel is sorry for the deaths of the Egyptian policemen during the attack on the Israel-Egypt border," Israeli Defence Minister Ehud Barak said in a statement Saturday. Israel said it would investigate.

A senior Israeli defence official told The Associated Press Saturday night that "initial reports in the investigation show that the terrorists came from Gaza and apparently opened fire on purpose near Egyptian positions in order to bring them into the fighting." He spoke on condition of anonymity because he was not allowed to speak to reporters.

Egypt is blaming Israel. It threatened to recall its ambassador to Israel in a strongly worded statement accusing Israel of violating the peace accord.

Israel and Gaza both border the Sinai Peninsula.

The 1979 Israel-Egypt peace treaty has come under fire in Egypt since the ouster of longtime President Hosni Mubarak in February after a popular revolt. Mubarak was seen by his people as overly favouring Israel and negotiating a highly unpopular deal to supply Israel with natural gas.

Israel, in turn, counted on Mubarak as a trusted, if cool, ally, maintaining the peace treaty despite Egyptian disappointment that it did not lead to a series of peace accords between Israel and the rest of the Arabs, especially the Palestinians. Israeli officials are wary about instability in post-Mubarak Egypt and a new government that might distance itself further from Israel.

The Israel-Egypt and Israel-Palestinian issues are closely intertwined. Egypt has tried for decades to broker a peace accord, and in recent years has tried to mediate an end to the internal Palestinian split between Fatah, which runs the West Bank through the Palestinian Authority, and the Islamic Hamas, which rules Gaza.

The potential for quick and serious trouble originating in Gaza and complicating relations across the region was never as clear as in the aftermath of the Thursday attack.

Israel hit back with an airstrike that killed the leaders of the splinter group thought responsible for the Thursday border attack. Palestinians retaliated for that with rocket salvos.

Israeli airstrikes have killed 12 Palestinians, including two children, since Thursday, and Israeli leaders have made it clear that they will not put up with mounting violence from Gaza. Israeli Prime Minister Benjamin Netanyahu convened senior ministers and security commanders late Saturday in an extraordinary session to discuss the surge in violence.

In parallel, Israel was trying to contain the damage to its already shaky relations with Egypt. Israel says the Gaza militants crossed into the Egyptian Sinai, probably through one of the hundreds of smuggling tunnels under the border, then made their way more than 100 miles (150 kilometres) through the barren desert before carrying out their attack on a border road near Israel's southern tip.

Israel has been concerned about an upsurge in Islamic militant activity in Sinai since Mubarak's fall, but no Israeli official has gone on record faulting Egypt for the way it is policing the Sinai, whose mountainous desert terrain and permeable borders have beckoned to extremists, contraband smugglers and African migrants for years.

Last week, Egypt moved thousands of troops into Sinai as part of a major operation against al-Qaida inspired militants who have been increasingly active since Mubarak's ouster.

Since Mubarak was toppled, the natural gas pipeline running through Sinai has been sabotaged five times, disrupting supplies to Israel and Jordan.

Although the military leaders who now rule Egypt have expressed their commitment to the peace treaty accord, anti-Israel sentiment has grown in Egypt since Mubarak's ouster and Israel is watching closely for signs that Egypt's new rulers might be responding to that sentiment.

Under Mubarak, the killings of troops would have elicited criticism on the front pages of Egyptian dailies. In post-Mubarak Egypt, however, youth activists on social networking sites spread calls for demonstrations in front of the Israeli embassy.

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

A dozen armoured vehicles were stationed in the area and soldiers formed a cordon in front of the main gates to prevent any protesters from reaching the embassy building.

In Jordan, the only other Arab country at peace with Israel, about 150 protesters called Saturday for cancellation of the 1994 treaty and expulsion of the ambassador.

Israeli officials insisted the peace treaty with Egypt was stable.

"No one had any intention to harm Egyptian security personnel," Amos Gilad, a senior Israeli Defence Ministry official who works closely with Egypt, told Israel Radio.