The first US state to prohibit the use of TikTok on personal devices will be Montana. The law was signed by Governor Greg Gianforte on Wednesday and will go into effect on 1 January.
The video-sharing app says the law “violates the First Amendment rights of Montanans”.
TikTok has faced scrutiny from regulators around the world over fears that data could be shared with the Chinese government.
Mr Gianforte, a Republican, said that a broader ban would help “our common goal of protecting Montanans from Chinese Communist Party spying.”
TikTok said in a statement that it had “hundreds of thousands of users” in Montana.
“We want to assure Montanans that they can keep using TikTok to express themselves, make a living, and find community as we continue to fight for the rights of our users in and out of Montana,” it added.
TikTok is likely to challenge the law in court.
Last month, Montana’s lawmakers voted 54 to 43 to pass a bill banning TikTok on personal devices.
The law will make it unlawful for app stores to offer TikTok, but does not prohibit people who already have TikTok from using it.
Montana, which has a population of just over 1m, banned the app on government devices last December.
TikTok says it has 150m American users. The app’s user base has grown in recent years, but it is still most popular with teens and people in their 20s.
However, there are worries across the US political spectrum that TikTok could pose a national security threat.
TikTok is owned by ByteDance – a Chinese company.
In March, a congressional committee questioned TikTok chief executive Shou Zi Chew about whether the Chinese government could access user data or influence what Americans see on the app.
Mr Shou repeatedly said that it would never spy on Americans – even though he admitted that employees had used the TikTok accounts of journalists to get information about them.
Earlier in March, the US government said ByteDance should sell TikTok or face a possible ban in the country.
The penalties apply to companies, but not individual users. Companies that violate the law face fines of up to $10,000 (£8,012), which would be enforced by Montana’s Department of Justice.
It means that tech giants like Apple and Google could face fines if they allow TikTok to be downloaded in Montana from their app stores.
TikTok’s owner ByteDance has repeatedly denied it is controlled by the Chinese government.