The bill was signed into law by President Joe Biden on Wednesday amid allegations that the app is controlled by the China government.

TikTok’s CEO, Shou Zi Chew, has vowed to fight the newly signed U.S. law that could see the popular app banned in courts.

The bill was signed into law by President Joe Biden on Wednesday amid allegations that the app is controlled by the China government.

Chew in a video posted on TikTok on Wednesday said, “We will keep fighting for your rights in the courts. The facts and the Constitution are on our side”.

“Rest assured, we aren’t going anywhere,” Chew said.

“We will keep fighting for your rights in the courts. The facts and the Constitution are on our side.”

Biden had signed a law to ban Chinese-owned TikTok unless it is sold within a year.

The law gives TikTok nine months to find a buyer, with the option of a three-month extension if a potential acquisition is in play.

In March, the U.S. House of Representatives passed a bill that would give TikTok’s Chinese owner ByteDance about six months to divest its assets in the country or face a ban, but some lawmakers said the time was too short.

The short video app is used by about 170 million Americans.

White House national security adviser Jake Sullivan had said that the aim was to end Chinese ownership of TikTok and not to ban the app.

“Do we want TikTok, as a platform, to be owned by an American company or owned by China? Do we want the data from TikTok – children’s data, adults’ data – to be going, to be staying here in America or going to China?” he said.

The ban measure was included in a $95 billion foreign aid package, including military assistance to Ukraine, Israel and Taiwan.

AFP reports that the bill, which could trigger the rare step of barring a company from operating in the US market, passed the Senate by a 79-18 vote three days after it cleared the House of Representatives with strong bipartisan support.

Under the bill, ByteDance would have to sell the app or be excluded from Apple and Google’s app stores in the United States.

TikTok for years has been in the crosshairs of American authorities, who say the platform allows Beijing to snoop on users in the U.S.

The bill passed by Congress also gives the US president the authority to designate other applications as a threat to national security if they are controlled by a country deemed to be hostile.