French children are saying “bonjour” to the new academic year — and “au revoir” to their cellphones during school hours.

That’s because a new law has come into effect which outlaws phone use by students up to the age of 15. The legislation, which follows a campaign promise by French President Emmanuel Macron, also banishes tablets and smart watches.

The ban is also in place at break times, with exceptions in cases of emergency and for disabled children, the French Education Ministry said in a statement. In emergencies, students can ask their teachers or supervisors for permission to use their phones. Meanwhile, high schools can voluntarily implement the measure.

Education Minister Jean-Michel Blanquer said the new rules aim to help children focus on lessons, better socialize and reduce social media use. The ban is also designed to fight online bullying and prevent thefts and violence in school.

Blanquer has hailed the legislation as "a law for the 21st century," according to Agence France Presse, that would improve discipline among France's 12 million school students.

"Being open to technologies of the future doesn't mean we have to accept all their uses," Blanquer said in June as the bill was going through parliament.

Nearly 90 percent of French 12- to 17-year-olds have a mobile phone, AFP reported, and supporters say the ban could limit the spread of violent and pornographic

content among children.

More:Child drownings linked to phone-distracted parents who fail to look up

More:No phones allowed (but touching is)! Immersive theater takes fans out of comfort zone

More:Teacher said no cell phone during test. So naturally, teen brings record player

More:Cell-phone free Thanksgiving dinner: You can do it, with grace

As for enforcement, it's up to individual school administrations to decide how to implement the ban, ABC News reported. School principals can decide to store students' phones in lockers or allow them to keep them, switched off, in their backpacks. The law allows teachers to confiscate phones until the end of the day in cases of non-compliance.

Jacqueline Kay-Cessou, an American who has been living in Paris for 25 years and whose 14-year-old son, David, is entering eighth grade at the Camille Sée international school, told ABC News she was happy to hear of the ban.

"It's fantastic news. It's something I've wanted for years," Kay-Cessou told ABC. "I think phones are harmful socially. Kids can't think and sit still anymore and it's highly addictive."

The Associated Press contributed to this story.