TikTok on Tuesday filed a lawsuit against the federal government to block the enforcement of a bill signed into law last month that would ban the popular video sharing app in the United States unless it is sold by Chinese parent company ByteDance.

The lawsuit from TikTok and ByteDance, filed with U.S. Court of Appeals for the District of Columbia Circuit, claims that the ban violates the First Amendment rights of its 170 million users in the U.S.

"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," the complaint reads, calling the ban "unconstitutional."

The bill was signed into law last month as part of a $95 billion aid package for Ukraine, Israel and Indo-Pacific allies, including Taiwan. Both chambers of Congress passed the bill in overwhelmingly bipartisan fashion. It requires ByteDance to sell TikTok within nine months, though that deadline can be extended if a sale is in progress.

But the lawsuit says that such a divestiture "is simply not possible: not commercially, not technologically, not legally."

Lawmakers on both sides of the aisle have expressed concerns that the Chinese government could force ByteDance to turn over U.S. user data or manipulate the app's algorithm to spread propaganda.

TikTok's lawsuit argues that national security concerns are insufficient to force a ban of the app.

"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 complaint reads. "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 Knight First Amendment Institute at Columbia University filed a brief in support of TikTok's effort.

"Restricting citizens’ access to media from abroad is a practice associated with repressive regimes, and it’s sad and alarming that we’re going down this road," Jameel Jaffer, Director of the Knight Institute, wrote on X, the platform formerly known as Twitter.

At the time of the bill's passage, TikTok CEO Shou Chew vowed that "we aren't going anywhere."

"We are confident, and we will keep fighting for your rights in the courts," Chew said.

The White House insists that it does not view the effort as a ban.

“We see this as a divestment, not a ban,” White House press secretary Karine Jean-Pierre said in April. “This is another piece of our national security and protecting our national security, protecting American people … making sure that they don't get exploited and that harm could be done.”