JERUSALEM - The Israeli army said it fired at unspecified Hamas "military targets" in Gaza on Wednesday after a Palestinian bomb attack on an army engineering unit working inside the Hamas-ruled territory.

No Israelis were reported injured in the explosion, which the army's radio station said appeared to have targeted a mechanical digger.

It was not clear what the engineering unit was working on, though Israel routinely carries out maintenance work on or near the border fence in an area it considers a buffer zone.

The army said the bomb was planted under cover of mass protests along the Gaza-Israel border since March 30.

"During routine activity in northern Gaza, an explosive device that was placed under the guise of the riots was detonated against an (army) engineering vehicle on the western side of the security fence," a military statement said.

"In response, the Israel Defence Forces struck a number of Hamas military targets," it added.

The statement did not give the location of the targets or the type of military fire used. Israel has used both tank fire and air strikes against Hamas targets in the past.

A Gazan security source said the strikes had targeted a base for Hamas's armed wing east of Gaza City, causing damage but no injuries.

Separately, two Palestinians were moderately injured east of Gaza City in clashes on Wednesday morning, according to the health ministry in Gaza.

The mass rallies, under the name "the Great March of Return," call for Palestinian refugees to be allowed back to their former homes now inside Israel.

They have led to clashes in which Israeli forces have killed 31 Palestinians. No Israelis have been hurt.

Meanwhile, a Palestinian who says he was shot by an Israeli sniper along the Gaza border said Wednesday he was posing no threat to soldiers at the time, after a video of the incident went viral.

The footage filmed from the Israeli side of the border fence, which included rejoicing after the shooting, was shared widely online and by the media earlier this week.

It led to further scrutiny of Israel's open-fire rules along the Gaza border.

Israel's defence minister praised the sniper, but criticised the soldier who filmed the incident.

Israel's military alleged that the soldier opened fire after rioting by Palestinians and warnings from soldiers.

Tamer Abu Daqqa, 28, said he recognised himself in the video, which was filmed on December 22 in southern Gaza, particularly due to the red jacket he was wearing.

AFP could not independently verify Abu Daqqa's claim, but separate footage from that day shows him in hospital after being shot in his leg, which is still in plaster four months after the incident.

Abu Daqqa said he had thrown stones at Israeli soldiers over the border during the day, but denied being armed or posing any threat at the time of the gunshot.

"When they shot me I was not throwing stones. I was yelling to friends near the fence to leave and go back to our homes," he told AFP at his home in Khan Yunis in the southern Gaza Strip.

The incident took place during protests along the Gaza border sparked by US President Donald Trump's controversial recognition of Jerusalem as Israel's capital, which infuriated Palestinians and led to clashes.

The Palestinians consider the eastern part of Jerusalem as the capital of their future state.

In the footage of the incident, voices can be heard discussing opening fire on Palestinians walking on the other side of the border fence.

A soldier then opens fire on one of the Palestinians, knocking the person to the ground.

"Wow. What a video! Yes! That son of a bitch," one of the voices behind the camera exclaims in Hebrew.

Israel's military on Tuesday confirmed the authenticity of the video, but alleged the shooting followed riots and warnings from troops.

It said a single bullet was fired toward the Palestinian "suspected of organising and leading this incident while he was a few metres from the fence," wounding him in the leg.

"In the video they say they killed me," said Abu Daqqa. "The sniper failed. I was only injured."

The video came at a highly sensitive time for Israel's military, which has faced mounting criticism over its use of live fire along the Gaza Strip border, where 31 Palestinians have been killed since late March as mass protests have led to clashes.

Hundreds of others have been wounded. There have been no Israeli casualties. The European Union, UN Secretary-General Antonio Guterres and others have called for an independent investigation into the deaths, which included a journalist.

Israel has rejected the calls, saying its forces have opened fire to stop attempts to damage the fence, infiltrations, bids to carry out attacks and at those seeking to harm soldiers.

It accuses Hamas, with whom it has fought three wars since 2008, of seeking to use the protests as cover for violence.

The Abu Daqqa video, though it dates from several months earlier, led to fresh questions about Israel's rules of engagement.

The Israeli human rights organisation B'Tselem said earlier this week that shooting incidents similar to what is seen in the video have "occurred hundreds of times over the past few weeks in the Gaza Strip, causing death and injuries."

Abu Daqqa said the video showed the Israelis were "terrorists".

"In the video they laugh at me and insult me. If they were men they would face me without weapons as I faced them," he said.

"I will continue to demonstrate for our land and our rights even if they injure me in every part of my body."