Gaza City, Palestinian Territories: Two Palestinians were killed by Israeli fire, Gaza medical sources said Sunday after four soldiers were wounded in an apparent bomb attack on the border with the Palestinian enclave.

The Saturday explosion and ensuing Israeli airstrikes marked one of the most serious escalations in the Hamas-ruled enclave since the Islamist movement and Israel fought a war in 2014.

Israel's army said it attacked "18 terror targets belonging to the Hamas terror organisation" in two waves of air strikes following the blast.

Representational image. Reuters

"Eight targets were attacked in a military compound near Deir el Balah, which belongs to the Hamas terror organisation, including weapon-manufacturing and training infrastructures," it said in a statement early Sunday.

It earlier said fighter jets had targeted "six military targets in Gaza belonging to Hamas, including a terror tunnel in the Zaytun area and military compounds near Deir el-Balah and Khan Yunis".

The army also reported that a "launch was identified from the Gaza Strip at Israeli territory", with a projectile hitting near a home in a southern Israeli community.

An Israeli police spokesman said the projectile had damaged a building but caused no injuries.

The two Palestinian fatalities were identified by the Gaza health ministry as Salam Sabah and Abdullah Abu Sheikha, both 17, who were killed east of Rafah in southern Gaza.

According to Palestinian eyewitnesses, they were shot by Israeli forces near the border on Saturday.

The Israeli army said that its forces had fired "warning shots" at a number of Palestinians approaching the border fence "in a suspicious manner".

Speaking at a security conference in Munich late Saturday, Israeli Prime Minister Benjamin Netanyahu had called the Gaza border incident "very serious" and pledged to "respond appropriately".

A Palestinian security source said the Israeli air strikes hit three bases belonging to Hamas in the east of the blockaded Gaza enclave.

Two Palestinians were injured in the raids, Palestinian medical sources said.

Earlier in the day, the army said "two soldiers were severely wounded, one moderately and one slightly" when an improvised explosive device blew up along the border fence with Gaza.

None of the soldiers' lives was in danger, a spokesman said.

Palestinian security sources said the explosion took place east of the city of Khan Yunis.

In response Israeli forces said a tank promptly opened fire at an "observation post" in southern Gaza, causing no injuries on the Palestinian side.

'Rogue group'

Israeli army spokesman Lieutenant Colonel Jonathan Conricus said a "rogue group" had claimed responsibility for the bomb blast, likely indicating one of the more radical Islamist groups who are present in Gaza.

But he insisted that "from our point of view Hamas is responsible" and said the explosive had been planted during a protest arranged by the group on Friday.

Israel holds the Islamist Palestinian movement Hamas responsible for any fire from the blockaded coastal enclave.

The Israeli army responds automatically to any strikes on its territory, generally targeting Hamas facilities.

Hamas's armed wing, the Ezzedine al-Qassam Brigades, said it had fired at Israeli jets overhead. Conricus denied the claim.

Hamas and Israel have fought three wars since 2008, and the last conflict in 2014 was waged in part over tunnels from Gaza that were used to launch attacks.

Israeli aircraft hit Hamas targets in the southern Gaza Strip repeatedly in early February, saying Palestinians there had fired a rocket into its territory.

Tensions between the Palestinians and Israel have been high since US president Donald Trump recognised Jerusalem as the capital of the Jewish state in December.

Netanyahu will visit the White House next month, a senior US administration official told AFP on Friday.

The 5 March visit comes as Netanyahu faces a scandal that has seen police recommend he be indicted for graft.