JERUSALEM — A macabre tug of war over the body of a Palestinian militant on the Gaza-Israel border, captured Sunday on video in broad daylight, prompted a barrage of rocket fire from Gaza met by retaliatory Israeli airstrikes late Sunday.

Israel’s use of heavy machinery to retrieve a militant’s body earlier in the day drew harsh criticism even within the country. But Israel’s hawkish defense minister, Naftali Bennett, defended the army’s seizure of the body as appropriate, suggesting it could be used as a bargaining chip to recover the remains of two Israeli soldiers who have been held in Gaza since 2014.

The day of tensions began around 6:30 a.m. when, Israel said, its soldiers spotted two militants from the Palestinian Islamic Jihad group placing an explosive near the border east of Khan Younis, in southern Gaza. Israel later released a surveillance video that it said showed the two men approaching the fence, and a photo of the explosive.

Palestinian Islamic Jihad’s armed wing has repeatedly tried to provoke violence between Israel and Gaza in recent months. But Prime Minister Benjamin Netanyahu of Israel has tried mightily to maintain quiet before elections set for March 2.