The Israeli military says a soldier was killed in a shootout with militants along the Israel-Egypt border.

Israeli troops shot and killed three militants who attempted to infiltrate the country on Friday, thwarting an attack.

Military spokeswoman Lt. Col. Avital Leibovich says the militants were also wearing explosive belts and flak jackets when 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. The military says an Israeli soldier was shot in the head during the gunbattle and later died of his wounds.

No further details were available and there was no immediate comment from Egypt on the incident along the border.

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 Egyptians soldiers -- 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 a sweeping 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.