China-based ByteDance Ltd. made clear it won’t comply with a new U.S. law requiring it to sell its popular TikTok video-sharing app, setting up what likely will be a prolonged court battle pitting free-speech rights against national-security interests that could end up at the Supreme Court.

The company on Tuesday filed a legal challenge to the measure signed by President Joe Biden last month that will ban the app in the U.S. if ByteDance hasn’t divested from TikTok by Jan. 19 — an ultimatum meant to address national security concerns that the Chinese government could access user data or influence what’s seen on the platform.

The lawsuit indicates that ByteDance doesn’t have any intention of trying to find a buyer for TikTok as the deadline approaches. Instead, ByteDance wants the law declared unconstitutional, saying it violates the First Amendment and represents an illegal punishment without due process or a presidential finding that the app is a national security threat.

“If the law is treated as an effective ban on operating the platform, it will face considerable skepticism in court,“ said Timothy Zick, a constitutional law professor at William & Mary Law School.

The lawsuit marks the first legal challenge since Congress passed the law in April. For now, the app is allowed to operate in the U.S., meaning the company doesn’t need to seek an emergency injunction. But as the deadline draws near, the company will likely have to ask for a court order postponing the ban.

The U.S. could face an uphill battle in court, as the Biden administration may be forced to publicly reveal classified or sensitive information as to why the law is justified and needed. Until now, officials have said the algorithm powering the app represents a national security threat that could be used by the Chinese government to carry out mass influence operations in America. However, the administration hasn’t publicly presented specific evidence to back up those claims.

“In political debates, Congress has asserted a national security interest pertaining to China’s access to user data,” Zick said. “But in a court the government will have to provide evidence these concerns are real and not speculative. And it will have to explain why it could not and did not pursue less speech-restrictive alternatives to address the asserted concerns.”

TikTok has argued the law will stifle free speech and hurt creators and small business owners who benefit economically from the the platform. The company said that in response to data security concerns, it spent more than US$2 billion to isolate its U.S. operations and agreed to oversight by American company Oracle Corp. 

The lawsuit was filed in the U.S. Court of Appeals for the District of Columbia against Attorney General Merrick Garland, who is charged with enforcing the law. The Justice Department didn’t respond to requests for comment.

The lawsuit seized on the lack of public evidence that TikTok is a national security threat.

“If Congress can do this, it can circumvent the First Amendment by invoking national security and ordering the publisher of any individual newspaper or website to sell to avoid being shut down,” the company said in its 67-page complaint. “And for TikTok, any such divestiture would disconnect Americans from the rest of the global community on a platform devoted to shared content — an outcome fundamentally at odds with the Constitution’s commitment to both free speech and individual liberty.”

The company also said a “qualified divestiture” as specified by the law is unfeasible commercially, technically and legally.

“For the first time in history, Congress has enacted a law that subjects a single, named speech platform to a permanent, nationwide ban, and bars every American from participating in a unique online community with more than 1 billion people worldwide,” according to the suit. 

TikTok, which is being represented by Covington & Burling LLP and Mayer Brown LLP, has argued that a ban would devastate 7 million businesses and shutter a platform that contributes $24 billion annually to the U.S. economy.

TikTok’s links to China have faced scrutiny under previous administrations. Former President Donald Trump used an executive order to try to force a sale of the app to an American company or face a ban. But his administration also faced multiple legal challenges and judges blocked the ban from taking place. When Biden became president, he put Trump’s ban under fresh review. 

A lobbying push against the law by TikTok Chief Executive Officer Shou Chew failed to persuade U.S. lawmakers who worried about the national security threat of China potentially accessing user data and disseminating propaganda to 170 million Americans — about half the U.S. population.

Advocates for TikTok praised Tuesday’s lawsuit. 

“TikTok’s challenge to the ban is important, and we expect it to succeed,” said Jameel Jaffer, executive director of the Knight First Amendment Institute at Columbia University. “The First Amendment means the government can’t restrict Americans’ access to ideas, information, or media from abroad without a very good reason for it — and no such reason exists here.”

With the key deadline in January, it’s possible that the DC Circuit will expedite the case, said Matthew Schettenhelm, an analyst for Bloomberg Intelligence. And then if, after that, the Supreme Court grants review of the case, it could be decided by the second quarter of 2025.

“We give TikTok a 30 per cent shot to win and expect a ruling in an expedited case in 4Q,” Schettenhelm wrote in a report. “The D.C. Circuit judges aren’t national-security experts, and they’re likely to defer to Congress’ judgment unless they find a clear First-Amendment violation.” 

Montana became the first U.S. state to enact a law that would ban residents from using the app. In December, a federal judge sympathized with TikTok’s free-speech argument in blocking the Montana measure while the legal challenge plays out.

Meanwhile, TikTok and other platforms face hundreds of lawsuits blaming them for addicting young people to social media and causing psychological distress.