The Israeli army said the two Palestinians "opened fire at Israeli soldiers", and published a video of the two fighters reportedly firing at soldiers, while Hamas said the allegation has no basis, as the fighters were training, and firing fixed targets.
"In response, an IDF (Israel Defence Forces) tank targeted the post from which the shots were fired", the statement read, adding that the post belongs to Hamas, an Islamist Palestinian group that runs Gaza. A 6-meter high fence and additional security measures will be installed on the barrier by the end of 2018, the ministry said in a statement. The shelling killed two Palestinians.
Hamas issued a statement threatening to retaliate for the deaths.
Hamas warned Israel that it would pay for the attack, without elaborating.More news: First case of West Nile virus found in Ada County
More news: Google Pixel 3 XL smiles for the camera
More news: China, Germany defend business with Iran in face of US threats
The cross-border incident came after a delegation of senior Hamas officials visited Gaza to discuss a ceasefire agreement with Israel proposed by the United Nations and Egypt.
The military released footage that it said was of the incident.
Hamas's military wing, the Izz al-Din Qassam Brigades, confirmed two of its members were killed, but said the border post was hit during an "exhibition" by a naval commando unit that was being watched by several Hamas leaders.
The "Great March of Return" protests sought the right of Palestinian refugees and their descendants, who according to the United Nations make up around two-thirds of Gaza's population, to return to their homeland inside what is now Israel.
The sides have been engaged in months of border violence.