JERUSALEM — Israeli forces shot and killed four Palestinian militants near the Gaza border fence after one tossed a hand grenade at Israeli troops on Saturday, the military said.

The men were armed with assault rifles, anti-tank missiles and other grenades, the Israeli military said on Twitter. The Israeli military posted images of the weapons it said the men had been carrying.

It said, “These are the weapons possessed by the terrorists who attempted to infiltrate into Israel from Gaza last night.”

At a news briefing, an Israeli army spokesman, Lt. Col. Jonathan Conricus, said that it had been a “very significant attempt to attack Israel.”