Three Israeli soldiers were killed and others injured by a gunman near the border with Egypt, according to the army.
A male and female soldier were found dead at an army post after failing to answer calls early on Saturday.
A third Israeli soldier and the alleged attacker – identified as an Egyptian policeman – were later killed during a search operation.
The incident happened just hours after a drug smuggling operation was thwarted at the border.
An Israeli army spokesman, Colonel Richard Hecht, said drugs worth 1.6 million shekels ($400,000) were seized after someone used a ladder to cross the fence.
He said it was assumed to be related to later shootings.
An army statement said: “An investigation is being carried out in full cooperation with the Egyptian army.”
Later, the Israeli and Egyptian armies confirmed that the deceased attacker was a member of the Egyptian security forces.