U.S. President Donald Trump’s order temporarily banning visitors from seven Muslim-majority countries shows that his administration does not understand its counterterrorism duties, Chinese state media said on Wednesday.

Trump’s Jan. 27 order, which he says is necessary for national security, sought to bar entry by travelers from Iran, Iraq, Libya, Somalia, Sudan, Syria and Yemen for 90 days, and by all refugees for 120 days, except for refugees from Syria, who face an indefinite ban.

The move, which sparked protests and chaos at U.S. and overseas airports, has been suspended by a federal judge in Seattle and is now under intense scrutiny from a U.S. federal appeals court questioning whether it unfairly targeted people over their religion.

China’s government has offered mild criticism of the ban, saying immigration policy was a sovereign right but “reasonable concerns” must be considered.

But the official Xinhua news agency said Trump’s order “shows that his administration has no correct recognition of the responsibility it needs to shoulder in a global fight against terrorism”.

“Radical elements around the world could use the ban to further justify their ruthless causes, and to gain more recruits,” Xinhua said in a commentary.

“That is a grave threat not only to the safety and security of the United States, but that of others worldwide.

“Banned countries on the list, such as Iraq, Libya and Syria, have been victimized by terrorism because previous U.S. governments and other Western powers deliberately intervened for self-interests,” it added.

Such commentaries from Xinhua do not equate to government policy, but often reflect official thinking.

The world’s most populous nation generally accepts few refugees. China offered permanent residence to 1,576 foreigners in 2016, the public security ministry has said, but such openings are largely reserved for experts and professionals.

China, which says it faces a serious threat from terrorism, has often rebuked the United States and other Western countries for what it considers their double standards on terrorism.

Nervous about being implicated in possible human rights abuses, Western nations have been reluctant to cooperate in China’s campaign in its far western region of Xinjiang, where officials say Islamist militants aim to set up a separate state.

Rights advocates say ethnic violence in the region in recent years is a response to repressive government policies affecting the largely Muslim Uighur people who call Xinjiang home, though China denies rights abuses there.

(Reporting by Michael Martina; Editing by Clarence Fernandez)