LONDON:British Prime Minister Boris Johnson narrowly avoided a defeat in Parliament on Tuesday after lawmakers voted against a controversial proposal seeking to bar trade deals with any country deemed by the U.K. High Court to be committing genocide.

The amendment to the government’s post-Brexit trade bill was largely designed to force international action in addressing China’s alleged human rights abuses against the Uighur minority in the far western Xinjiang region.

Campaigners had said that if the proposal passed, Britain would become the first country in the world to allow genocide cases to be considered in domestic courts.

Johnson's working majority stood at just 11 after lawmakers rejected the proposal in a 319-308 vote.

Under the proposal, minorities alleging they have been the subject of genocide can for the first time apply to the High Court of England and ask for judges to determine if a country trading with the U.K. has perpetrated genocide. If the court makes a preliminary ruling against that country, Britain’s government would be forced to revoke bilateral trade agreements.

The move had earlier passed by a majority in Parliament’s upper House of Lords, and had the backing of all opposition parties and a significant number of rebel Conservatives. Leaders from Britain’s Jewish, Muslim and Christian communities also supported it.

The vote came as outgoing U.S. Secretary of State Mike Pompeo declared Tuesday that China’s policies on Muslims and ethnic minorities in Xinjiang constitute crimes against humanity and “genocide.”

The move was sure to anger Beijing, which has repeatedly denied reports of rights abuses in Xinjiang, including mass detentions in prison-like internment centers, alleged forced labor and forced birth control for Uighur women. Officials have insisted the detention centers are intended to combat extremism and teach job skills.

An Associated Press investigation last summer found that the Chinese government was forcing systematic and draconian birth control measures on Uighurs, Kazakhs and other ethnic minorities in Xinjiang, including IUD — or intrauterine device — fittings, contraceptives and even abortions and sterilizations.

In the U.K., Johnson has been facing increasingly vocal calls within his Conservative party for a stronger and more coherent policy on China that counters the country’s rights abuses and violations of international norms.

Foreign Secretary Dominic Raab last week called the trade bill amendment “well-meaning” but ineffective and counter-productive.

But in a joint letter to lawmakers urging them to back the amendment, the opposition Labour Party’s foreign affairs spokeswoman, Lisa Nandy, and international trade spokeswoman, Emily Thornberry, said voting for the proposal will send a clear message that “when the most serious violations of human rights occur we will not turn away.”

“In particular, we are all gravely concerned about the situation in Xinjiang and the growing body of evidence of the systemic human rights abuses being committed by the Chinese government on an industrial scale against the Muslim Uighur people and other minorities,” they said.

Those backing the British parliamentary measures argued that despite mounting evidence of atrocities targeting Uighurs in Xinjiang, the United Nations is highly unlikely to refer Beijing to the International Criminal Court because China, a permanent member of the Security Council, will veto the move.

Johnson’s office said his government had a “proud record” standing up for human rights in China.

“We recognize the strength of feeling but the government doesn’t support the amendment,” his press secretary, Allegra Stratton, said.