Media playback is unsupported on your device Media caption The BBC visits the camps where China’s Muslims have their "thoughts transformed"

The US House of Representatives has passed a bill to counter what it calls the "arbitrary detention, torture, and harassment" of Uighur Muslims in China.

It calls for "targeted sanctions" on members of the Chinese government - and names the Communist Party secretary in the Xinjiang autonomous region, Chen Quanguo.

The bill still needs approval from the Senate and from President Donald Trump.

China reacted angrily, calling it a "gross interference".

But Uighur rights groups welcomed the passage of the bill, which they said sent an important message to China.

The Uighur Human Rights Policy Act 2019 bill was passed by 407 to 1 in the House of Representatives on Tuesday night.

Its passage comes days after Mr Trump signed into law a bill that supports pro-democracy protesters in Hong Kong - also leading to condemnation from China.

The BBC's China correspondent John Sudworth said - if it became law - the bill would mark the most significant international attempt to pressure China over its mass detention of Uighurs and other Muslim minorities.

What's in the bill?

The purpose of the bill is "to address gross violations of universally recognised human rights, including the mass internment of over 1,000,000 Uighurs".

It also accuses China of "systematically discriminating" against Uighurs by "denying them a range of civil and political rights, including the freedoms of expression, religion, movement and a fair trial".

The bill details some of the policies allegedly carried out by China against Muslims in Xinjiang.

These include:

Pervasive, high-tech surveillance - including the collection of DNA samples from children

The use of QR codes outside homes to gather information on how frequently individuals pray

Facial and voice recognition software and "predictive policing" databases

The Uighur bill calls for sanctions on Chinese officials who are "credibly alleged to be responsible for human rights abuses in Xinjiang".

It also names Mr Chen, who has been dubbed the "architect" of the camps.

Media playback is unsupported on your device Media caption The BBC's John Sudworth meets Uighur parents in Turkey who say their children are missing in China

The bill calls on Mr Trump to "condemn abuses" against the Uighurs, for China to immediately close all the camps, and to "ensure respect for internationally-guaranteed human rights".

Republican Thomas Massie, from Kentucky, voted against the Uighur bill. He also voted against the Hong Kong bill.

On Twitter, Mr Massie explained his rationale for voting against both bills, writing: "When our government meddles in the internal affairs of foreign countries, it invites those governments to meddle in our affairs."

What reaction has there been?

China, which denies any mistreatment of Uighurs, said the bill was an affront to its policies in Xinjiang and amounted to interference in its internal affairs.

"This bill deliberately smears the human rights condition in Xinjiang, slanders China's efforts in de-radicalization and counter-terrorism, and viciously attacks the Chinese government's Xinjiang policy," a foreign ministry statement said.

It said the policy in Xinjiang was "about fighting violence, terrorism and separatism", adding that "thanks to those efforts, Xinjiang hasn't seen a single terrorist attack over the past three years".

The statement also said "the international community speaks highly of China's Xinjiang policy".

China also reacted angrily to the Hong Kong bill - suspending visits by US Navy ships and aircraft to Hong Kong, and issuing sanctions against US-based human rights groups.

In contrast, the World Uyghur Congress (WUC), a human rights group, hailed the bill for rebuffing what it called "China's continued push of extreme persecution" in Xinjiang.

Dilxat Raxit, spokesman for the WUC, said the organisation looked forward to President Trump signing the bill into law.

What's going on in Xinjiang?

Rights groups say hundreds of thousands of Muslims are detained in high-security prison camps across Xinjiang.

The Chinese authorities say the Uighurs are being educated in "vocational training centres" in order to combat violent religious extremism.

But evidence shows many are being detained for simply expressing their faith - for example, praying or wearing a veil - or for having overseas connections to places like Turkey.

Records seen by the BBC show China is also deliberately separating Muslim children from their families.

This is an attempt to "raise a new generation cut off from original roots, religious beliefs and their own language", Dr Adrian Zenz, a German researcher, told BBC News earlier this year.

"I believe the evidence points to what we must call cultural genocide."

China's ambassador to the UK said the allegations were "lies".