The IDF Spokesperson's Office stated that the bombing was retaliation for the Qassam rocket fire from Gaza towards southern Israel Saturday night.
The bombing was a conclusion to 24 hours of tension at the Gazan border. On Sunday afternoon two Palestinians were killed and four injured from IDF fire near the northern Gaza Strip town of Beit Lahiya.
The army said a number of men approached the security fence separating Israel and the Hamas-run coastal enclave with the aim of planting an explosive device.
Mortars were launched toward the gunmen after they ignored calls to stop, the IDF said, adding that forces identified a hit.
The two gunmen who were killed were identified as 21-year-old Abd al-Silwai of the Popular Resistance Committees and Mahmoud Nasir, 20, of the Popular Front for the Liberation of Palestine.
The army said the two had been active in the planting of bombs along the border and in the firing of mortars and rockets toward Israel, including the August 24 mortar attack in which an IDF soldier was lightly hurt.