*

* TikTok claims the law violates Americans' free speech rights

* TikTok has spent over $2 billion on efforts to protect U.S. user data

WASHINGTON, June 20 (Reuters) - TikTok and Chinese parent ByteDance on Thursday urged a U.S. court to strike down a law they say will ban the popular short app in the United States on Jan. 19, saying the U.S. government refused to engage in any serious settlement talks after 2022.

Legislation signed in April by President Joe Biden gives ByteDance until Jan. 19 of next year to divest TikTok's U.S. assets or face a ban on the app used by 170 million Americans. ByteDance says a divestiture is "not possible technologically, commercially, or legally."

The U.S. Court of Appeals for the District of Columbia will hold oral arguments on lawsuits filed by TikTok and ByteDance along with TikTok users on Sept. 16. TikTok's future in the United States may rest on the outcome of the case which could impact how the U.S. government uses its new authority to clamp down on foreign-owned apps.

"This law is a radical departure from this country’s tradition of championing an open Internet, and sets a dangerous precedent allowing the political branches to target a disfavored speech platform and force it to sell or be shut down," ByteDance and TikTok argue in asking the court to strike down the law.

Driven by worries among U.S. lawmakers that China could access data on Americans or spy on them with the app, the measure was passed overwhelmingly in Congress just weeks after being introduced.

TikTok says any divestiture or separation - even if technically possible - would take years and it argues that the law runs afoul of Americans' free speech rights.

Further, it says the law unfairly singles out TikTok for punitive treatment and "ignores many applications with substantial operations in China that collect large amounts of U.S. user data, as well as the many U.S. companies that develop software and employ engineers in China."

ByteDance recounted lengthy negotiations between the company and the U.S. government that it says abruptly ended in August 2022. The company also made public a redacted version of a 100-plus page draft national security agreement to protect U.S. TikTok user data and says it has spent more than $2 billion on the effort.

The draft agreement included giving the U.S. government a "kill switch" to suspend TikTok in the United States at the government’s sole discretion if the company did not comply with the agreement and says the U.S. demanded that TikTok's source code be moved out of China.

"This administration has determined that it prefers to try to shut down TikTok in the United States and eliminate a platform of speech for 170 million Americans, rather than continue to work on a practical, feasible, and effective solution to protect U.S. users through an enforceable agreement with the U.S. government," TikTok lawyers wrote the Justice Department in an April 1 email made public on Thursday.

In 2020, then-President Donald Trump was blocked by the courts in his bid to ban TikTok and Chinese-owned WeChat, a unit of Tencent in the United States.

The White House says it wants to see Chinese-based ownership ended on national security grounds, but not a ban on TikTok. Earlier this month, Trump joined TikTok and has recently raised concerns about a potential ban.

The law prohibits app stores like those of Apple and Alphabet's Google from offering TikTok. It also bars internet hosting services from supporting TikTok unless it is divested by ByteDance. (Reporting by David Shepardson in Washington Editing by Matthew Lewis)