The Israeli navy fired on Palestinian divers off Gaza, and Palestinian medics said they later retrieved four bodies.
The Israeli military said its forces prevented an attack on Israeli targets, but did not explain further.
Israel has been enforcing a blockade of Gaza since 2007, when the Islamic militant group Hamas seized the territory.
The closure also includes a maritime blockade that was highlighted in recent days when Gaza-bound aid ships were intercepted by the Israeli navy.
In the incident, a naval force spotted Palestinians in diving suits and opened fire, the military said.
Four bodies were retrieved and taken to a hospital in central Gaza, said Moawiya Hassanain, a Palestinian health official.
Two of the dead had suffered multiple gunshots to the head.
The Palestinian naval police said two people were still missing.
The incident came a week after nine pro-Palestinian activists were killed in a clash with naval commandos as their vessel tried to reach Gaza.
The interception prompted a worldwide outcry and growing demands that Israel ease or lift the blockade.