Three Israeli soldiers and an Egyptian security officer were killed near the countries' border on Saturday, Israel and Egypt said, in an incident whose details remained unclear but which the countries said they were investigating jointly.
The Israeli military said an Egyptian policeman shot and killed two of its soldiers while they secured a military post at the Egyptian border early on Saturday, after forces successfully thwarted a large 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, said Eliezer Toledano, the Israeli military's Southern Command chief.
Egypt's 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.
"We will not leave any question unresolved," including the possibility that the shooting was related to the smuggling activity overnight, said Toledano.
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 on Saturday 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.
Israel's Defense Minister Yoav Gallant said he conducted an assessment with the chief of staff and that the military "will investigate the event as required".
Egypt in 1979 became the first Arab country to sign a peace treaty with Israel and the more than 200km (124 miles) 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.