The shooting attack at the Alexis de Tocqueville school left the town of Grasse — the country's picturesque perfume capital — in shock, since school shootings are rare in the European nation. A national police official said authorities have no reason to suspect it was terrorism-related, and said there did not appear to be any other suspects, although police were working to "remove all doubt."
The principal and two others were hit by bullets and five other people were being treated for shock, she said. None of the injuries was life-threatening.
The student, who has not been publicly identified, was arrested in possession of multiple weapons after the attack, the police official said.
During the attack, some students hid at the school and others were evacuated. A police helicopter circled overhead in what is normally a relatively quiet corner of France. Police cordoned off the area and worried residents gathered outside in the town, which is 40 kilometers (25 miles) from the southern city of Nice.
By mid-afternoon, Interior Ministry spokesman Pierre-Henry Brandet said all students at the school were safe.
He said it's too early to know the motives for the attack, which came as France is under a state of emergency after a string of deadly Islamic extremist attacks over the past two years.
An employee of a nearby electronics store said police had asked residents to stay indoors. An employee of sports chain Decathlon, which has a branch less than 500 meters from the high school, said he'd seen about 40 high school students leaving and gathering in a nearby parking lot.
Both local residents would not provide their names.
The government sent out an alert warning of an attack after police reported that shots were fired, but later lifted it. The alert is part of a system implemented by the government after the deadly November 2015 attacks in Paris.
Angela Charlton in Paris and Raphael Satter in London contributed.
Copyright 2017 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.