France will ban mobile phones in schools across the country from next month.
A new law bans students up to the age of 15 from using "all connected objects", including phones, tablets and smartwatches.
Education Minister Jean-Michel Blanquer has previously said the ban is a matter of public health because children are not playing during breaks anymore.
On Tuesday, Mr Blanquer tweeted that the law had passed with only one vote against it.
"Thank you to all parliamentarians for this progress for our schools," Mr Blanquer said.
Mr Blanquer told French news channel BFMTV the law was designed to "protect children and adolescents".
"We know today that there is a phenomenon of screen addiction, the phenomenon of bad mobile phone use," he said.
French newspaper Le Monde reported that 62 MPs voted for the law, with many others abstaining saying it was a "political display" that would not change anything.
The French education code already bans the use of phones during teaching hours, a rule which has been in place since 2010.
Alexis Corbiere, the deputy leader of the Unbowed France party, which abstained from the vote, and a former teacher, said the law was unnecessary because of the existing code.
"This isn't a 21st century law in our eyes, but a law from the era of news channels and binary debate," Mr Corbiere said.
"In reality, the ban has already been made.
"I don't know a single teacher in this country that allows the use of phones in class."
The smartphone ban was a policy French President Emmanuel Macron took to the last election.
According to French newspaper Le Monde, there are exceptions to the law for educational purposes or for students with a disability, and individual schools can decide how they will adopt the law.
High schools are not obligated to implement the ban, but have the option.