The use of Chinese-owned social media app TikTok on phones and other devices issued to government ministers and civil servants has been banned.
Cabinet Office Minister Oliver Dowden told MPs the app would be banned on security grounds with immediate effect.
He described it as "precautionary" but "prudent" move, following a review by the National Cyber Security Centre.
TikTok has strongly denied allegations that it hands users' data to the Chinese government.
Mr Dowden said: "The security of sensitive government information must come first".
But he told MPs the ban would not extend to ministers' or civil servants' personal phones, or the general public - because this was a "proportionate" response to a "specific risk with government devices".
He described it as "good cyber hygiene".
"However, as is always the case, we do advise individuals to practise caution online and to consider each social media platform's data policies before downloading and using them," Mr Dowden added.
Deputy Labour leader Angela Rayner welcomed the ban, but accused the government of being "behind the curve" and "closing the stable door after the horse has bolted".
TikTok said it was "disappointed", adding that the decision was "based on fundamental misconceptions and driven by wider geopolitics, in which TikTok and our millions of users in the UK, play no part".
"We remain committed to working with the government to address any concerns but should be judged on facts and treated equally to our competitors," said a spokesman.
Both Downing Street and the Ministry of Defence (MoD) have TikTok accounts - and the MoD uploaded a video of a Challenger 2 tank, a type being supplied to Ukraine, to its account on Thursday morning.
It told the BBC it would continue to use TikTok among a "wide range of digital channels... to promote the work of the Armed Forces and to communicate our support to Ukraine".
"Robust processes are in place to ensure our devices are secure, including managing risks from third party applications. Our most sensitive information is held on a separate system," a spokesperson added.
The UK Parliament closed its TikTok account last August. The Downing Street TikTok page has not been updated since Boris Johnson left office in September last year, but others including the MoD and Energy Security Secretary Grant Shapps have updated their pages more recently.
Mr Shapps has said he will continue to use the app on his personal phone while taking security precautions - in line with the government's new policy.
A spokeswoman for Mr Shapps said he was "concerned that representatives of the people who deliberately choose not to engage with the public on the platforms that they actually use are unlikely to continue to represent these voters for long".
Government ministers have come under pressure from senior MPs to follow UK allies in banning the app.
The United States barred TikTok from official devices in December, and the European Commission followed suit last month. Canada, Belgium and India have taken similar action.
China has accused the US of spreading disinformation and suppressing TikTok amid reports the White House wants its Chinese owners to sell their stakes in the firm.
TikTok insists it does not share data with Chinese officials, but Chinese intelligence laws requires firms to help the Communist Party when requested.
Western social media apps such as Facebook, Instagram and Twitter are blocked in China.
The Cabinet Office said the ban had been imposed because TikTok users were required to hand over data including contacts and geolocation data.
Mr Dowden told MPs there would be "limited exemptions" on some government devices, made on a "case-by-case basis" where the app was required for work purposes.
But former cabinet minister Sir Iain Duncan Smith argued that ministers and senior civil servants should be told to remove TikTok from their personal phones as well.
He said he did not believe that "private phones will never be used for Government business. They will be, they are, and there is no way of stopping that to some degree."
With 3.5bn downloads worldwide, it's fair to say the growth of TikTok has been explosive.
It's very enticing. It's incredibly easy to record short videos, add music and fun filters all within the app.
People joke about what a time-suck TikTok can be even if you don't want to post anything and that's because its algorithm is super-sharp at serving up exactly the videos which appeal to you, and keep you there, seeing adverts in between.
The reason for that, of course, is that the platform gets to know a lot about you.
It records how long you watch a particular video for, which ones you comment on or favourite. If you have an account it also knows your age, your location and your device, and it even monitors your typing rhythms. Its cookies track your activity elsewhere on the net.
It is true that other huge social networks do the same thing.
But they are US-based and n the case of TikTok, we have occasionally seen what appears to be the hand of Beijing on the shoulder of Chinese parent company ByteDance.
A handful of Western journalists were found to have been tracked by ByteDance employees. ByteDance says they were fired.
A US TikTokker shared a video criticising the Chinese government's treatment of the Uighur Muslims, and it was taken down. TikTok said this was a mistake.
This has added to the nervousness of governments and security specialists - despite the firm's consistent denials.
The Chinese state demands loyalty from all businesses based in the country and nobody really knows to what extent ByteDance might be pushed to comply with demands for data.
On Wednesday, Science and Technology Secretary Michelle Donelan, who also has a TikTok account, told MPs the public could go on using the app.
She said: "It is absolutely a personal choice. But because we have the strongest data protection laws in the world, we are confident that the public can continue to use it."
TikTok hosts short-form videos submitted by its users. In 2022, it became the world's most downloaded app.