An IDF engineering force operating in the buffer zone along the Israeli border with Gaza came under fire Wednesday close to the Kissufim Crossing in the southern Strip.
According to the troops, the shots were fired at their D9 armored bulldozer from the Gaza Strip.
There were no injuries reported among the troops, but there was damage sustained to the bulldozer.
The IDF Spokesperson's Unit confirmed that the incident took place, saying the army had responded to the attack.
"Several bullets were fired at an engineering vehicle during engineering activity on the western side of the perimeter fence in the southern Gaza Strip," the military said.
"In response to the shooting, an IDF tank fired on a position of the Hamas terrorist organization. There were no casualties to our forces and the vehicle sustained minor damage."
Hamas has been in charge of the Gaza Strip since seizing power and expelling the Palestinian Authority more than 10 years ago.
According to the Palestinians, the troops were clearing an area next to farmland east of the Gaza city of Khan Yunis and close to the perimeter fence.
The IDF distributed leaflets to Gazan farmers warning them not to keep cultivating land close to the fence due to the concerns that terrorists would use high crops as cover to approach the fence and plant explosives.
The Palestinians also reported that the IDF fired smoke bombs to provide them with their own cover.
Officials at Eshkol Regional Council on the Israeli side of the border said: "A shooting took place targeting IDF troops operating along the border in the central area of the council. There were no casualties in the incident."
The council also sought to reassure local residents that the gunfire had ceased.
"The IDF is operating at the site and the incident is under control," it said.
"We are in constant contact with the army and there is no change in the guidelines for local residents."