Greece’s parliament has passed a law banning children under 15 from using social media, with the restrictions set to take effect on January 1 and requiring platforms to verify users’ ages.

Prime Minister (PM) of Greece Kyriakos Mitsotakis announced the plan in April, using TikTok, one of the most popular social media platforms among young people, to explain why he considered the measure “difficult but necessary.”

Mitsotakis’s conservative New Democracy party used its parliamentary majority to pass the bill after a debate that began on Thursday and continued into Friday. No other party supported the legislation, a Greek news agency reported.

The opposition socialist Pasok party abstained from the vote after proposing an alternative bill. Its proposal sought to prohibit social media use among children under 13 while requiring parental controls for those aged 13 and 14.

Other left-wing and nationalist parties voted against the legislation.

The new law will require social media companies to introduce age-verification measures. Platforms that fail to comply will face harsh penalties once the law takes effect on January 1.

Greece’s decision comes as governments in several countries introduce restrictions on children’s access to social media. Australia became the first country to impose such a ban last year, prohibiting children under 16 from using the platforms.