TEL AVIV—Israel closed a stretch of beaches north of the Gaza Strip after two explosive-laden barrels washed ashore and Palestinian militants promised more, in revenge for what some in Hamas said was Israeli's assassination of a top Hamas leader last month.

Maritime authorities warned civilian vessels to be alert to possible dangers in the Mediterranean after the military linked the barrels to two explosions at sea Friday. At the same time, police deployed helicopters and mounted units to comb the length of Israel's coastline...