PARIS — A heavily armed student opened fire and wounded four people Thursday at a high school in the southern France city of Grasse, officials said.
The student, whose identity was not released, was subsequently arrested, a spokesman for France’s National Police said.
A spokesman for the Interior Ministry, speaking on French television, said the suspect is a 17-year-old student at the Lycée Alexis de Tocqueville in Grasse who was in possession of a rifle, two handguns, and two grenades when arrested.
In a statement Thursday afternoon, the Alpes-Maritimes Prefecture, which includes Grasse, said the student ‘‘attacked for reasons that remain to be determined.”
Four people, including the school’s principal, suffered gunshot wounds, while four others were slightly injured in the clamor to escape the school building, the statement said. All the shooting victims were hospitalized.
Another student at Lycée Tocqueville, identified only as Benjamin, 16, told the Nice-Matin newspaper that the shooting occurred during lunch hour.
‘‘Around 12:40, I was sitting down, finishing eating,’’ he told the paper. ‘‘I heard this loud bang and then two more. I turned around, and I saw someone in the courtyard with a shotgun, shooting. He was firing on the windows of the classrooms overlooking the courtyard. When I saw that, I ran away.’’
Interviewed on France’s BFM Television, Andréas, another student at the school, described a scene of ‘‘total panic’’ that began with four shots.
‘‘We started running,’’ he said. ‘‘We would have thought we were in a film. In the hall, there were traces of blood.’’
The suspect was of ‘‘European’’ origin, a spokesman for the National Police told the Post. There was no immediate word of any link to Islamist terrorism. Christian Estrosi, president of the Provence-Alpes-Cote d’Azur administrative region, which includes Grasse, said Thursday’s shooting was ‘‘absolutely not’’ a terrorist attack.
France, set for a highly contentious presidential election next month, has remained under a constant ‘‘state of emergency’’ after terrorist attacks claimed by the Islamic State group that killed 130 people in Paris in November 2015.
Also Thursday, a letter bomb exploded in the Paris offices of the International Monetary Fund. The employee who opened the letter was wounded in the hand and face, police said.
Christine Lagarde, the French director of the Washington-based IMF, condemned what she called a ‘‘cowardly act of violence against’’ her staff.
François Hollande, France’s Socialist president, has been frequently criticized for the country’s perpetual ‘‘state of emergency’’ by both the right and the left.