A teenager had his hand blown off as high school protesters clashed with French police during chaotic riots, as students across the country continue to protest poor conditions and teacher shortages.

The 15-year-old had picked up a police dispersal grenade that detonated in the town of Lens, losing his hand and part of his lower arm, officials said Monday, national demonstration by the pupils' union against underfunding, overcrowding and dilapidation.

The protests come months ahead of an election to replace outgoing President Emmanuel Macron. The demonstrations began in Paris, mostly focusing on poor suburbs, before spreading nationwide.

Government officials said the protests have evolved into violence, including some schools being ransacked.

"We’re going to keep blocking until the government hears us," Sami Karen, 18, told Reuters while demonstrating outside Charles de Foucauld high school in Paris. "As long as they don’t listen to us, we won’t stop this fight."

In total, more than 5,000 people have been arrested since the protests began, with 87% of them being minors. More than 1,800 people are facing prosecution, including 1,483 minors, France's Justice Ministry said.

The specific charges were not disclosed.