Kids in France between the ages of 3 and 15 won't be able to bring their smart devices to school starting in September.
High schools will have the option to choose whether to adopt the ban. Lawmakers voted in favor of the decision 62-1 on Monday.
Back when he was on the campaign trail, now-French President Emmanuel Macron promised to ban mobile phones in schools.
One 2015 study shows that banning phones in schools improves students' test scores.
Some lawmakers argued that the ban won't really change much, though, since most teachers already ban the use of phones in the classroom.
This new law makes exceptions for students with disabilities and will allow the use of smart devices during extracurricular activities.
Many schools around the world already ban the use of phones.
Additional reporting from Newsy affiliate CNN.