France passed legislation to restrict the use of social media for children under 15 years old, becoming the first major European country to do so in a move that may strain relations with U.S. technology companies and President Donald Trump.

The votes in the National Assembly and the Senate pave the way for possible implementation when school resumes.

Kids under 15 years old won’t be able to create new accounts starting September before a full ban comes into effect in January for existing profiles, according to the text. Meta Platforms’ Instagram, WhatsApp and Facebook; Snap; Elon Musk’s X; Google’s YouTube; and China’s TikTok will likely be most affected.

President Emmanuel Macron has championed the initiative with other European Union leaders and G7 countries at a summit in Evian last month. Germany, Greece, Portugal, Denmark, Poland, Austria, Ireland, the Netherlands, the U.K. and Canada have expressed interest in similar measures, and the EU has unveiled an app to confirm users’ age online to help coordinate verification requirements across the bloc.

The legislation aims to force platforms to verify users’ age on the content-sharing parts of social media services — not the messaging part, the MP promoting the text, Laure Miller, told French newspaper Le Figaro.

Macron has cited “loneliness,” “bullying” and teens’ cognitive development as reasons for the ban.

He previously slammed “American platforms and Chinese algorithms” for capitalizing on youngsters’ emotions. “Our children’s brains are not for sale,” he said in a video in January.

A practical challenge will be how users’ ages are verified, with the platforms set to choose their own third-party tools. Many teens found workarounds to a similar ban implemented late last year in Australia.

Another complication is avoiding regulatory fragmentation in Europe. The EU will propose its own law to restrict children’s access to social media after the summer break, Ursula von der Leyen, the head of the bloc’s executive arm, said last week.

The French bill also bans mobile phones in high school, tightening existing limits.