GRASSE, France (Reuters) - A teenager opened fire at his high school in southeastern France on Thursday, wounding up to four people, in an attack apparently inspired by videos of U.S. mass shootings such as Columbine, officials said.

People embrace near the Tocqueville high school after a shooting has taken place in Grasse, southern France, March 16, 2017. REUTERS/Eric Gaillard

The incident in Grasse, which does not appear to be linked to militancy, comes with France on high alert after more than 230 people were killed in the past two years by attackers allied to Islamic State.

“It was total panic,” Achraf, a student in the school, said on BFM TV. “The gunshots were at 4 to 5 meters from where we were. We thought the gunman was coming toward us. We heard him shouting.”

France’s Education Minister Najat Vallaud-Belkacem visited the scene in Grasse, a town known for its perfume industry, and said the attack appeared to be “a crazy act by a fragile young man fascinated by firearms”.

“His motivations seem to be linked to bad relations he had with other students in school,” Grasse prosecutor Fabienne Atzori told reporters.

With a presidential election less than six weeks away, the attack by a 16-year-old armed with a shotgun loaded with lead pellets looked likely to further stoke France’s debate on security.

Separately in Paris, an employee of the International Monetary Fund (IMF) was injured in the face and arms when a letter bomb posted to the world lender’s local office blew up as she opened it, police said.

Atzori said 10 people had been hurt in the school attack, either physically or emotionally. One person was shot in the stomach and the headmaster was injured in the shoulder after trying to stop the gunman.

The youth, who was also carrying munitions, handguns, a grenade and what seemed to be a homemade explosive device, put up no resistance when he was arrested at the school, she said.

The youth was not known to police and checks were being made to establish whether there were any accomplices and how he had acquired his weapons.

“The first investigations suggest he had consulted videos of mass killings in America,” an interior ministry spokesman said.

GUN LAWS

France has some of the strictest gun laws in the world. French citizens are banned from owning automatic weapons, while many other guns require government authorization and a medical exam, along with a permit from a hunting or sport shooting federation.

Slideshow ( 9 images )

“This is reminiscent of the Columbine tragedy in the U.S.,” Socialist presidential candidate Benoit Hamon told reporters, referring to the 1999 incident in which two students fatally shot a teacher and 12 classmates before killing themselves.

Images of what appeared to be the Grasse attacker’s Facebook and YouTube pages showed a fascination with Columbine and violent images, as well as with instructions for homemade weapons.

Local emergency services used Twitter to advise residents of the town of about 50,000 inhabitants to stay at home after the shooting began around 1 p.m. (1200 GMT).

Witnesses interviewed by local television described a scene of panic as the gunman entered the canteen, with students rushing to hide under tables or sprinting for the exit.

“I just know the gunman by sight. He was gentle and low-key key, not a nasty guy,” student Achraf added. BFM TV did not give his family name.

Atzori said the teenager, who fired two or three times, had initially entered a classroom looking for someone in particular.

After he had left, pupils alerted the headmaster to his presence. The headmaster, who did not appear to be the target, was shot trying to calm the assailant down.

“He’s a normal boy. There were no signs. He is a bit reserved and doesn’t make waves,” Jean-Rene Laget, a local resident who knows the student’s father, told Reuters. “His father never said he had problems with him.”