When massive protests broke out in Hong Kong last year over a contentious extradition bill, part of a pattern of Chinese encroachment on the semiautonomous city, senior U.S. officials including President Trump and Secretary of State Mike Pompeo issued calls for security forces and Beijing to respect the rights of protesters and listen to their demands.

Less than a year later, with the world’s attention captured by images of U.S. authorities using tear gas, pepper spray and rubber bullets to crack down on protesters against racism and police brutality, China and other U.S. rivals have seized the opportunity to highlight U.S. domestic turbulence and accuse Washington of hewing to double standards.

Over the past week — as Americans flooded the streets of major cities in response to the death of George Floyd, a black man who died in police custody in Minneapolis last week after a white officer knelt on his neck for nearly nine minutes — Chinese government spokesmen and media controlled by China’s ruling Communist Party published continual coverage of the demonstrations and police crackdowns that have at times turned violent.

Rui Zhong, a program associate at the Wilson Center, a think tank, said that the U.S. protests came at a moment when diplomatic tensions between Beijing and Washington were already amplified as the countries bristled over China’s plans to implement a sweeping national security law that will dramatically affect Hong Kong’s autonomy. That was coupled with an ongoing U.S.-China trade war and Trump’s vociferous criticism of Beijing’s response to the novel coronavirus pandemic.

“Within this environment you have these protests break out, and you have police officers using a lot of force, using riot control and military equipment to hit back at protesters,” Zhong said. The crackdown has created “an opportunity for Chinese state media to spin this as a commentary on Hong Kong.”

This week, China Global Television Network America, which is controlled by the Communist Party, tweeted regular updates on the arrests of protesters in major U.S. cities and shared footage describing Trump’s “show of force” in Washington.

“US deploys weapons of war in bid to control protests,” read one headline in the English-language version of the Global Times, another Communist Party-controlled news outlet. The newspaper’s editor also tweeted that U.S. “repression of domestic unrest has further eroded the moral basis to claim itself ‘beacon of democracy.’”

At a news conference in Beijing on Monday, Zhao Lijian, a spokesman for China’s foreign ministry, questioned why Washington stood by protesters in Hong Kong but labeled those rallying against racial discrimination in the United States as “thugs.”

“Why did the U.S. have so many problems with the restrained and civilized way of law enforcement by the Hong Kong police but have no problem at all with threatening to shoot at and mobilizing the National Guard against its domestic protesters?” he asked.

(As The Washington Post reported last year, police in Hong Kong violated their own rules during demonstrations and used excessive force against civilians without consequences.)

Hong Kong’s chief executive, Carrie Lam, told reporters this week that even though the United States has its own domestic troubles, Washington looks “through tinted glasses” at national security concerns in Hong Kong.

“There are riots in the U.S. — we are seeing how local governments are reacting,” she said. “When we had similar riots in Hong Kong, we saw what position they adopted then.”

Authoritarian governments elsewhere that have faced U.S. criticism are also using the protests as an opportunity to turn the tables on the United States.

Chechen leader Ramzan Kadyrov, who faces allegations of widespread human rights abuses, posted on social media this week that he was “watching with horror the situation in the United States, where the authorities are maliciously violating ordinary citizens’ rights,” the Moscow Times reported.

And the Russian Foreign Ministry said in a statement that “the United States has certainly accumulated systemic human rights problems: race, ethnic and religious discrimination, police brutality, bias of justice, crowded prisons and uncontrolled use of firearms and self-defense weapons by individuals, to name a few.”

In a speech this week Iran’s supreme leader, Ayatollah Ali Khamenei, described Floyd’s death in detail and noted that several other police officers who witnessed their colleague kneeling on his neck did not intervene.

“This is in their nature,” he said of Americans.

“They commit crimes, you can see, heinous and open crimes. That’s how they act. They don’t apologize for that. At the same time they talk about human rights,” Khamenei said, according to an English interpretation of the remarks on Press TV, a state-run English-language broadcaster.

In Iraq, where Washington has condemned Iran-backed militias for probably killing hundreds of protesters last year, armed groups flipped the script. “The U.S. has always pretended to be number one in democracy, but this is proven now as pure lies,” said Muhammad Mohiyeh, a spokesman for the Iran-backed Kataib Hezbollah group. “We see the racism and the violence they are using against protesters, putting the army in the streets against unarmed people.”

On social media, the paramilitary-linked al-Ahad television channel posted photos of white men holding guns in the United States, with a caption reading, “Deployment of white armed militias on the streets of America after the killing of a black man.”

In China, images of journalists and protesters injured in recent days have been used to push the narrative that the United States is not “a perfect society or political system, and it’s actually quite violent, insecure and unjust,” said Maria Repnikova, an assistant professor in global communication at Georgia State University who has researched media and politics in China.

Missing from that narrative, she said, is that some U.S. journalists have been wounded covering protests, whereas in China, where protests are more tightly controlled, “many journalists would simply not be allowed to go there in the first place.”

Critics of the Chinese government have pointed out the apparent hypocrisy in its attempts to express solidarity with minority groups in the United States when Beijing has faced condemnation in recent years for its crackdown on Chinese ethnic minorities. That includes on the Uighur minority in Xinjiang province, where more than a million people have been held in “reeducation centers.”

And in April, Beijing faced a major embarrassment when Africans living in the southern Chinese city of Guangzhou reported that a xenophobic campaign had forced black residents into lengthy quarantines and sometimes led to their evictions, along with other indignities. Several African governments summoned Chinese ambassadors over the matter, and the U.S. Consulate in Guangzhou issued a warning for African American travelers.

Zhong, at the Wilson Center, said that attempts by Chinese officials to deflect human rights concerns back at the United States are “sometimes sloppy.”

She pointed to a recent attempt by Hua Chunying, a spokeswoman for the Chinese foreign ministry, who retweeted Moussa Faki Mahamat, chairman of the African Union Commission, after he called on the United States to eliminate racial discrimination. She responded to his tweets, writing “All lives matter” — a divisive term in the United States that many activists see as an attack on the acknowledgment of systemic racism.

“The intent of releasing a response is there,” Zhong said. “But sometimes the homework isn’t 100 percent done.”

Louisa Loveluck in London and Paul Schemm in Dubai contributed to this report.