Three Egyptian security officers fired at soldiers after crossing several dozen meters into Israel, Israeli military officials said.
The Israeli troops returned fire, killing two of the infiltrators, the officials said on condition of anonymity since they were not authorised to discuss such matters with the media.
Egyptian police said that three Egyptian security personnel exchanged fire with the Israeli soldiers after crossing the border and that two of them were killed.
The reason for their infiltration into Israel was not immediately known, said Essam al-Shaikh, the head of Egyptian police in the border area. He did not say who shot first.
The Israeli army confirmed that two gunmen were killed in an exchange of fire along the border with Egypt, but did not give the identity of the men.
The incident happened in the central part of the border with Egypt, near Mount Sagi, the army said. Israel Radio said the exchange of fire occurred in an area of the border that is not fenced.
Israel's defence ministry has opened an investigation into the incident, Army Radio reported.
The incident came two days before the Israeli prime minister, Ehud Olmert, is to meet the Egyptian president, Hosni Mubarak, in Sharm al-Shaikh, the Egyptian resort on the Red Sea.