Israeli troops shot and killed three militants attempting to infiltrate the country from Egypt, thwarting a major terror attack, the military said.

Military spokeswoman Lt. Col. Avital Leibovich said the militants were armed with weapons and were wearing explosive belts and flak jackets.

She said they opened fire on troops guarding a team of workers building a border fence between Israel and Egypt’s lawless Sinai desert. The Israeli troops returned fire, killing the militants.

Egyptian intelligence officials said the attackers had crossed the border and that one of the three militants blew himself up inside Israel.

The Egyptian officials, speaking on condition of anonymity according to regulations, said an intelligence team had been dispatched to Israel to inspect the bodies of the militants and was looking to take them back to Egypt for further investigation. Egypt also boosted security on the Egyptian side of the border, they said.

No further details were immediately available.

The Israel-Egypt border has become increasingly volatile since the fall of longtime Egyptian ruler Hosni Mubarak in a popular uprising last year. Israel has repeatedly warned Egypt’s new authorities of the deteriorating situation and the growing militancy in Sinai.

Militants have staged multiple attacks on a pipeline delivering gas from Egypt to Israel, frequently lobbed rockets into the Jewish state and have snuck across the border and killed Israelis.

One of the most brazen attacks came last year, when Palestinian militants crossed from Gaza into Sinai, made their way along the Israel-Egypt border, then crossed into Israel and attacked Israeli vehicles, killing eight people.

Israeli forces, chasing the attackers, then killed six Egyptian troops – an incident that increased tensions between the two countries.

And in August, Islamist gunmen brazenly killed 16 Egyptian soldiers before smashing through a fence into Israel. Egypt responded by launching an operation in the Sinai Peninsula, using tanks and troops against the militants.

Since Mubarak was toppled, Israel has allowed Egypt to send in more troops to Sinai to deal with the militant threat. Sinai has been mostly demilitarized according to the 1979 peace deal between the two countries.

Israel has issued several travel warnings to its citizens against visiting Sinai, based on information alleging that militant groups from the Gaza Strip were operating in the area and planning to attack or kidnap Israeli tourists.

Sinai has become increasingly lawless and dangerous, and al-Qaida-inspired groups are operating in the region.