A relative of a Palestinian man killed in Israeli shelling reacts at a hospital in Gaza City Nov. 10, 2012. (MOHAMMED SALEM/REUTERS)

Palestinian militants fired an antitank missile at an Israeli army vehicle on Israel’s border with the Gaza Strip on Saturday, wounding four soldiers and prompting Israeli shelling that local medical officials said killed four Palestinian civilians and wounded 25 others.

The flare-up, one of the worst in months, followed a series of recent incidents in which explosive devices were detonated near Israeli forces operating on both sides of the border fence between the Gaza Strip and Israel.

An Israeli army spokesman said that on Saturday an antitank missile was directed at a military patrol along the fence and that in response, the army “targeted several sites in the Gaza Strip” with tank fire.

The Popular Front for the Liberation of Palestine, a small militant faction in Gaza, asserted responsibility for the border attack, saying it had fired two antitank missiles.

The Israeli shelling hit a densely populated neighborhood in eastern Gaza City, with some rounds landing near a tent where people had gathered to pay condolences to a family in mourning, according to reports from the scene.

Ashraf al-Kidra, a spokesman for the Gaza Health Ministry, said that all four of those killed were civilians ages 16 to 18, and that the wounded included children.

Rami Harra told the Associated Press that his 17-year-old brother, Muhammad Harra, had been killed in the shelling. “He went out to see what happened, and when he started to help evacuating wounded people who were on the ground, another shell hit the place and killed him,” Rami Harra said outside a Gaza morgue, according to the AP report. “Why did they kill him? I can’t believe that I am seeing his dead body.”

Israeli Defense Minister Ehud Barak said that the military had “responded harshly” to the border attack and that “more responses will be considered in the coming days.”

“We will not tolerate a deterioration of events on the border fence,” he added.

Fawzi Barhoum, a spokesman for the Islamist group Hamas, which rules Gaza, threatened retaliation for what he said was the targeting of civilians. “The resistance has the full right to respond to the Israeli crimes,” Barhoum said in a text message to reporters.

At least 15 rockets fired from Gaza later slammed into southern Israel, causing no casualties, police said. The Israeli army said it held Hamas “solely responsible for any terrorist activity emanating from the Gaza Strip.”

Saturday’s violence came after an uptick in incidents near the border fence.

On Thursday, an explosives-packed tunnel blew up near Israeli troops, destroying an empty army vehicle and lightly injuring a soldier. Palestinians later reported that a 13-year-old boy was killed by Israeli gunfire.

On Oct. 23, an Israeli officer lost a hand when an explosive device detonated at the border fence.

Hamas has generally refrained from firing rockets at Israel since a large-scale Israeli offensive in Gaza nearly four years ago that killed hundreds of Palestinians. But although Hamas has sought to rein in smaller militant factions, those groups have often fired at Israel in response to drone strikes targeting their members.