TikTok's owner ByteDance has been accused of allowing Chinese Communist Party (CCP) members to access the data of Hong Kong civil rights activists and protesters.
Users who uploaded "protest-related content" were also identified and monitored, former ByteDance executive Yintao Yu alleges in a US court filing.
The CCP members were also able to access US TikTok user data, Mr Yu says.
A ByteDance spokesperson denied the claims, describing them as "baseless".
The allegations are contained in a San Francisco Superior Court filing made this week as part of a lawsuit brought by Mr Yu.
In the filing, Mr Yu claimed that members of a CCP committee had access to a "superuser" credential, which was also known as "god user", which allowed them to view all data collected by ByteDance.
He also alleged that the committee members were not ByteDance employees but were physically present at the company's offices in Beijing.
This was common knowledge among senior executives, said Mr Yu, who for around a year from August 2017 was a head of engineering in the US for ByteDance.
The filing also alleged that in 2018 the CCP committee members used their "god credential" to "identify and locate the Hong Kong protesters, civil rights activists, and supporters of the protests".
Hong Kong saw huge protests in 2014 – the so-called Umbrella movement – where people demanded the right to elect their own leader. After that, there were smaller demonstrations by civil rights activists. Much of this visible dissent has disappeared since Beijing cracked down with a draconian national security law after the anti-government 2019 protests.
When contacted by the BBC, a ByteDance spokesperson strongly denied the allegations: "We plan to vigorously oppose what we believe are baseless claims and allegations in this complaint."
They also said that Mr Yu was employed by the company for less than a year and in that time worked worked on a now-discontinued app called Flipagram.
"It's curious that Mr Yu has never raised these allegations in the five years since his employment for Flipagram was terminated in July 2018. His actions are clearly intended to garner media attention," the ByteDance spokesperson added.
Mr Yu's claims come as TikTok is under intense scrutiny around the world.
In March, TikTok's chief executive Shou Zi Chew faced four-and-a-half hours of questioning at a US congressional hearing.
Mr Chew was quizzed by both Democrats and Republicans over the app's data security and privacy practices, and its alleged ties to Beijing.
A spokesperson for TikTok said afterwards that the politicians were "grandstanding".
In May, Montana became the first US state to pass a sweeping ban on the Chinese-owned video-sharing platform.
The ban is due to take effect in January 2024. It will make it illegal for app stores to offer TikTok, but does not ban people who already have TikTok from using it.
TikTok has sued to block Montana from imposing the ban, saying it conflicts with US free speech rights. Montana, which has a population of just over one million, banned the app on government devices last December.
TikTok says it has 150 million 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.
You may also be interested in:
This video can not be played
Watch: The fight over TikTok explained in 60 seconds
TikTok sues to overturn first US state ban
TikTok tracked UK journalist via her cat's account
What could a TikTok ban mean for creators?
Children stabbed in French park in stable condition
US East Coast facing worst air quality in years
El Niño planet-warming weather phase has begun
Catching the men who sell subway train groping videos
Maps and images show scale of Ukraine dam floods
Misogyny helped jail a mother. Science freed her
What to do with the bodies of those killed in Sudan
Why this teen says he was rejected by top US colleges
The only place in the world selling lab-grown meat
Could AI create more work for humans?
Why it took 42 years to convict a 90-year-old in India
Why is Japan redefining rape?
Tech Decoded: The latest news direct to your inbox
Tech Decoded is the BBC's international technology newsletter, bringing you the latest twice a week
Why the city that never sleeps is slowly sinking
The generation clocking the most hours
© 2023 BBC. The BBC is not responsible for the content of external sites. Read about our approach to external linking.