Three Israeli soldiers and an Egyptian security officer were killed near the countries' border today, Israel and Egypt said, in an incident whose details remained unclear.
The countries said they were jointly investigating the matter.
The Israeli military said an Egyptian policeman shot and killed two of its soldiers while they secured a military post at the Egyptian border earlier today, after Israeli forces successfully thwarted a smuggling attempt overnight.
It said the Egyptian officer and a third Israeli soldier were killed hours later in a confrontation inside Israeli territory.
As soon as the two Israeli soldiers were discovered dead, the military treated the incident as a terrorist attack, Major General Eliezer Toledano, the Israeli military's Southern Command chief, said.
The two soldiers, a man and a woman, were "killed by live fire adjacent to the border", the Israeli army said in a statement.
The female soldier was identified as Lia Ben Nun, 19, and the male was 20-year-old Ori Izhak Iluz. The third soldier killed later was Ohad Dahan, 20.
A fourth Israeli soldier, a non-commissioned officer, was lightly wounded and evacuated to hospital, the military added.
The Egyptian military said the three Israeli and one Egyptian security personnel had been killed in an exchange of fire as the Egyptian security officer chased smugglers across the frontier.
Egyptian and Israeli officials are probing the circumstances of the incident in full cooperation, the Israeli military and two Egyptian security sources said.
"The fatal incident at the Egyptian border during the Sabbath is serious and unusual and will be thoroughly investigated," Israel's Prime Minister Benjamin Netanyahu said in a statement.
The Israeli military said it was unclear how the Egyptian officer crossed the border fence and soldiers were searching the area to rule out additional assailants.

An Israeli military spokesperson said two soldiers had been shot while on duty in a relatively desolate area along the desert border with Egypt this morning.
Their bodies were found later, after they failed to answer the radio, the spokesperson added.
Once the military understood the incident was ongoing, soldiers identified an infiltration into Israeli territory, leading to a gunfight in which the assailant, an Egyptian policeman, and the third Israeli soldier, were killed, it said.
An Egyptian army spokesman said "a member of the security forces... chased drug smugglers. During the chase, the security agent crossed the security fence (border)" and an exchange of fire took place.
Toledano said Israel "will not leave any question unresolved," including the possibility that the shooting was related to the smuggling activity overnight.
Israel's Defence Minister Yoav Gallant said he conducted an assessment with the chief of staff and that the military "will investigate the event as required".
The Egyptian army said its defence minister Mohamed Zaki offered his condolences in a phone call with Gallant and the two discussed taking necessary measures to avoid a repeat of the border shooting incident.
Egypt in 1979 became the first Arab country to sign a peace treaty with Israel and the more than 200km long border has largely remained calm.
The Israeli military spokesperson said that while drug smuggling attempts in the area were frequent, the last known infiltration into Israel that resulted in casualties happened some 10 years ago.