Montana is set to become the first US state to ban Chinese-owned media giant TikTok from personal devices.
Governor Greg Gianforte signed the ban into law on Wednesday. It is due to take effect on 1 January.
The video-sharing platform says the ban “infringes on the First Amendment rights of the people of Montana”.
TikTok has come under scrutiny from authorities around the world over concerns that data could be passed to the Chinese government.
Mr Gianforte, a Republican, told lawmakers that a wider ban would further “our shared priority to protect Montanans from Chinese Communist Party surveillance.”
TikTok said in a statement that it was used by “hundreds of thousands of people” in Montana.
“We want to reassure Montanans that they can continue using TikTok to express themselves, earn a living, and find community as we continue working to defend the rights of our users inside and outside of Montana,” it added.
TikTok is expected to challenge the legislation in the courts.
Last month, lawmakers in Montana passed a bill banning TikTok on personal devices by a vote of 54 to 43.
The law will make it illegal for app stores to offer TikTok, but does not ban 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. Although the app’s user base has expanded in recent years, it is still most popular with teenagers and users in their 20s.
However, there are concerns across the US political spectrum that TikTok could be a national security risk.
TikTok is owned by ByteDance – a Chinese company.
In March, a congressional committee grilled 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 – despite admitting that employees had used the TikTok accounts of journalists to obtain 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. Firms that break the law face penalties of up to $10,000 (£8,012), which would be enforced by Montana’s Department of Justice.
It means that technology 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.