VALERY HACHE via Getty Images Police officers control traffic near the Tocqueville high school in Grasse, southwestern France, after a shooting occured in the school on March 16, 2017.

At least three people were injured after a shooting at a high school in the small southern French town of Grasse, and a 17-year old student carrying a rifle, handguns and grenades was arrested, the interior ministry and police sources added.

“The individual does not seem to be known by police,” one police source said.

A second source said it appeared that two students had opened fire on the headmaster, who had been injured, adding that the suspects did not seem to be militants.

“One of the two was arrested and the second fled. There was panic and the students took refuge in the (neighboring) supermarket,” said the source.

Interior ministry spokesman Pierre-Henry Brandet told France Inter radio that three people had been injured, and advised families to remain patient as police took control to stabilize the situation. He had earlier told BFM TV eight were injured.

He said checks were underway on the possibility of a second assailant.

The incident comes with France in a state of emergency after several militants attacks over the last year. It is less than six weeks away from a presidential election in which security and fears of terrorism are among key issues.

An eye-witness student in the school interviewed by France Inter radio said the students had heard a bang and taken cover under the tables.

“I went to close the windows and saw a guy who looked at me in the eyes. He seemed to be a student and not very big. He shot in the air and ran away,” the student said without giving his name.

Local emergency services advised residents on Twitter to stay at home. The government launched its mobile telephone application warning of a “terrorist” attack.

(Reporting by Emmanuel Jarry, Sophie Louet, and John Irish; Editing by Adrian Croft and Sudip Kar-Gupta)