JERUSALEM/CAIRO: Three Israeli soldiers and an Egyptian security officer were killed near the countries' border on Saturday, Israel and Egypt said, in a rare incident that the countries said they are investigating jointly.

The Israeli military said an Egyptian policeman shot and killed two soldiers while they secured a military post at the Egyptian border early on Saturday. It said the officer and a third Israeli soldier were killed in a confrontation inside Israeli territory hours later.

Egypt's military said that 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 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 in the Negev desert along the Egypt border early on Saturday. Their bodies were found later, when they didn't 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 Defence Minister Yoav Gallant said he conducted a situational 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.

The Israeli military spokesperson said that while drug smuggling attempts in the area were frequent, the last known infiltration into Israel happened some 10 years ago. (Reporting by Henriette Chacar and Cairo Newsroom; Additional reporting by Emily Rose; Editing by Toby Chopra and Angus McDowall)