Africans in southern China's largest city say they have become targets of suspicion and subjected to forced evictions, arbitrary quarantines and mass coronavirus testing as Beijing steps up its fight against imported infections, drawing US accusations of xenophobia.

China says it has largely curbed its COVID-19 outbreak but a recent cluster of cases linked to the Nigerian community in Guangzhou sparked the alleged discrimination by locals and virus prevention officials.

Local authorities in the industrial centre of 15 million said at least eight people diagnosed with the illness had spent time in the city's Yuexiu district, known as "Little Africa".

Five were Nigerian nationals who faced widespread anger after reports surfaced that they had broken a mandatory quarantine and been to eight restaurants and other public places instead of staying home.

Guangzhou had confirmed 114 imported coronavirus cases as of Thursday -- 16 of which were Africans. The rest were returning Chinese nationals.

The tense situation has made Africans targets of suspicion, distrust and racism in China -- and brought a stinging rebuke Saturday from Washington.

Several Africans told AFP they had been forcibly evicted from their homes and turned away by hotels.

"I've been sleeping under the bridge for four days with no food to eat... I cannot buy food anywhere, no shops or restaurants will serve me," said Tony Mathias, an exchange student from Uganda who was forced from his apartment on Monday.

"We're like beggars on the street," the 24-year-old said.

Mathias added that police had given him no information about testing or quarantine but instead told him "to go to another city".

Photo: AFP / Fred DUFOUR

Police in Guangzhou declined to comment when contacted by AFP.

A Nigerian businessman said he was evicted from his apartment this week.

"Everywhere the police see us, they will come and pursue us and tell us to go home. But where can we go?" he said.

Other Africans said the community had been subject to mass COVID-19 testing even though many had not left China recently, and people had been placed under arbitrary quarantine at home or in hotels.

Photo: AFP / Kola Sulaimon

China has banned foreign nationals from entering the country, and many travellers are being sent into 14-day quarantines either in their own accommodation or at centralised facilities.

Thiam, an exchange student from Guinea, said police ordered him to stay home on Tuesday even after he tested negative for COVID-19 and told officers he had not left China in almost four years.

He believes the measures are specifically and unfairly targeting Africans.

"All the people I've seen tested are Africans. Chinese are walking around freely but if you're black you can't go out," he said.

The US State Department has issued an alert advising African Americans, or those with potential contact with African nationals, to avoid Guangzhou.

Then on Saturday the department issued a sharp criticism of China over how it treats Africans.

"It's unfortunate but not surprising to see this kind of xenophobia towards Africans by Chinese authorities," a State Department spokesperson said.

The US in recent weeks has denounced what it calls Beijing's lack of transparency at the start of the coronavirus epidemic, which was first detected in late 2019 in the Chinese city of Wuhan. American officials say the delay resulted in thousands of deaths around the world.

Despite a recent truce in the US-Chinese war of words, skirmishes have continued between the two world powers, already locked in a long-term strategic confrontation.

The infections in Guangzhou have also sparked a torrent of abuse online, with many Chinese internet users posting racist comments and calling for all Africans to be deported.

Last week a controversial cartoon depicting foreigners as different types of trash to be sorted through went viral on social media.

"There's just this crazy fear that anybody who's African might have been in contact with somebody who was sick," said David, a Canadian living in Guangzhou who did not want to give his full name.

China's foreign ministry acknowledged this week that there had been some "misunderstandings" with the African community.

"I want to emphasise that the Chinese government treats all foreigners in China equally," said spokesman Zhao Lijian on Thursday, urging local officials to "improve their working mechanisms".

The complaints in Guangzhou contrast with a welcome reception to Chinese efforts in battling the coronavirus across the African continent, where Beijing this week donated medical supplies to 18 countries.