A student takes a photo on a smartphone after reading his exam results at a school in Paris. (Eric Feferberg/AFP/Getty Images)

When French students return to school in September, they’ll have to leave one of their most prized possessions at home — their smartphone.

French lawmakers on Monday passed legislation banning students as old as 15 from bringing smartphones and tablets to school, or at least requiring that they be turned off, according to the Agence France-Presse. Officials in support of the new rule described the policy as a way to shield children from addictive habits and to safeguard the sanctity of the classroom.

“We know today that there is a phenomenon of screen addiction, the phenomenon of bad mobile-phone use,” education minister Jean-Michel Blanquer told French news channel BFMTV, according to CNN. “Our main role is to protect children and adolescents. It is a fundamental role of education, and this law allows it.”

The law, however, makes exceptions for educational use, extracurricular activities and for students with disabilities, the AFP reports. French high schools can choose to impose a less-stringent ban on Internet-connected devices.

Even before the new policy was voted in, French law prohibited students from using their phones while class was in session. But during the 2017 French presidential election, Emmanuel Macron pledged to impose a school ban on phones entirely.

This isn’t the first French law designed to beat back the encroachment of digital technology in everyday life. Last year the government passed a law requiring French companies to draft rules that limited work emails and work-related technology outside the office. Dubbed the “right to disconnect,” French officials said the legislation aimed to reduce job-related stress and prevent employee burnout.

"Employees physically leave the office, but they do not leave their work. They remain attached by a kind of electronic leash, like a dog,” Benoît Hamon, Socialist member of Parliament and former French education minister, told the BBC. “The texts, the messages, the emails: They colonize the life of the individual to the point where he or she eventually breaks down.”