Israeli troops on Friday shot dead three heavily armed gunmen who sneaked across the Egyptian border and ambushed troops, averting "a very big terror attack," a military spokesperson said.
The incident took place on the Israeli side of the frontier at a place called Har Harif which is almost half way down Israel's 240-kilometre border with the Egyptian Sinai Peninsula.
"Three armed terrorists entered from the Sinai into Israel," army spokesperson Lieutenant Colonel Avital Leibovich told reporters.
"They opened fire toward IDF (army) troops that were guarding the workers (building the fence) in that area. Another force that was nearby... rushed to the area and targeted those three terrorists," she said.
"All three terrorists were killed."
She said the gunmen were "very well armed and prepared" in terms of equipment, and were also wearing explosives belts.
"A very big terror attack was thwarted by the quick response of these soldiers," Leibovich said, ruling out the possibility that any further gunmen had infiltrated Israeli territory.
Border security incidents have increased over the past 18 months as a wave of lawlessness has gripped the Sinai since the overthrow of veteran Egyptian president Hosni Mubarak.
On 18 June, at least three militants sneaked across the border from Sinai and ambushed two cars carrying Israeli construction workers, killing one and sparking a firefight with the army in which two of the gunmen died. The third fled back to Egypt.
The most serious incident so far took place in August 2011, when another group of gunmen from Sinai infiltrated southern Israel and staged a series of ambushes that killed eight Israelis.
Israel has accused Gaza-based militants of using the Sinai as a launchpad for cross-border attacks and has demanded that Egypt crack down on Islamist elements in the lawless peninsula.
In a bid to prevent such attacks, as well as the entry of illegal immigrants from Africa, Israel has been working on construction of a massive steel barrier along its border with the Sinai.