A federal judge has ruled that Montana cannot enforce a first-in-the-nation law banning the video-sharing app TikTok in the state while a legal challenge to the law moves through the courts .

The judge issued a preliminary injunction to block the ban on the Chinese-owned app. The law was set to take effect on January 1, 2024.

The judge’s ruling came after TikTok and five Montana content creators filed a case against the state’s ban on the video-sharing app 

The judge appeared skeptical about Montana’s TikTok ban in a hearing, telling representatives of the state that their argument for restrictions on the app “just confuses me.

 The judge seemed to side with the American Civil Liberties Union and Electronic Frontier Foundation that the ban is unenforceable and unconstitutional .

 TikTok argued that the app has been in use since 2017 and letting Montanans continue to use it will not harm the state.

 The company has said in court filings that the state passed its law based on “unsubstantiated allegations” that Montana cannot regulate foreign commerce and that the state could have passed a law requiring that TikTok limit the kinds of data it collects, or require parental controls, rather than trying to enact a complete ban.

TikTok sued the state on constitutional grounds, broadly accusing Montana of unfairly singling out TikTok and violating free-speech protections.

Attorneys and academics said the ban is not likely to survive the challenges, and the outcome is expected to influence whether governors in other states pursue their own bans

The state’s ban is likely unconstitutional, and even if legal, it is unlikely to be an effective measure to protect consumer privacy .