GAZA CITY, Gaza Strip (AP) — Two Palestinians, ages 17 and 14, were killed by Israeli gunfire Friday during protests along the perimeter fence separating Gaza and Israel, Gaza health officials said.

The teenagers' deaths marked an uptick in violence after months of relatively restrained demonstrations.

The Israeli military said the more than 6,000 Palestinian demonstrators engaged in "especially violent" protests. It said the protesters threw "a large amount of explosive devices, grenades and firebombs" and damaged parts of the border fence.

Israeli forces also detained two Palestinians who crossed the frontier into Israel.

Sami al-Ashqar, 17, was shot in the neck in the northern Gaza Strip and Khaled al-Rabie, 14, was hit in the chest in east Gaza City, doctors and the health ministry said. The ministry said 46 other people were wounded by live fire.

The Israeli army said it used "riot dispersal means."

In what seemed a response to the deaths, Palestinian militants in Gaza fired five rockets into southern Israel communities, the Israeli military said. There were no reports of injuries and no Palestinian group claimed responsibility for the rockets.

The U.N. envoy to the region, Nickolay Mladenov, condemned the shooting of the two teens, calling it "appalling." He wrote on Twitter that Israel "must calibrate its use of force, use lethal force only as a last resort, and only in response to imminent threat of death or serious injury."

Mladenov also urged protesters to be peaceful and called for ending "the cycle of violence."

Gaza's Hamas rulers launched regular weekend protests in March 2018 to demand the easing of an Israeli-Egyptian blockade that has crippled the territory since 2007.

More than 200 Palestinians and an Israeli soldier have been killed during the marches, which had been subdued in recent months after mediators brokered an unofficial cease-fire.

Hamas says Israel doesn't honor the agreement.