(CNN) Beijing is facing a diplomatic crisis in Africa after reports of alleged coronavirus-related discrimination against African nationals in China sparked widespread anger across the continent.

African students and expatriates in the southern Chinese city of Guangzhou were last week subject to forced coronavirus testing and arbitrary 14-day self-quarantine, regardless of recent travel history, amid heightened fears of imported infections.

Large numbers of African nationals were also left homeless , after being evicted by landlords and rejected by hotels in the city.

Having reportedly contained the virus within China, concerns have grown in recent weeks over a so-called second wave, brought into the country by overseas travelers.

In Africa, however, governments, media outlets and citizens reacted angrily to the apparent rise in anti-foreigner sentiment, as videos of Africans being harassed by police, sleeping on the streets or being locked into their homes under quarantine circulated online.

On Saturday, the front page of Kenya's biggest newspaper lead with the headline , "Kenyans in China: Rescue us from hell," as a member of the country's parliament called for Chinese nationals to leave Kenya immediately. TV stations in Uganda , South Africa and Nigeria also ran stories on the alleged mistreatment.

The fallout threatens to undermine China's diplomatic efforts in Africa. In recent years, African nations have become key diplomatic and trade partners to Beijing, with China's trade with Africa worth $208 billion in 2019, according to official figures from China's General Administration of Customs.

In a statement released Sunday, Chinese Foreign Ministry spokesman Zhao Lijian denied China had been singling out foreigners.

"We are still facing great risks of imported cases and domestic resurgence. Particularly, as the pandemic spreads all over the world, imported cases are causing mounting pressure," said Zhao.

"All foreigners are treated equally. We reject differential treatment, and we have zero tolerance for discrimination," he added.

A breakdown in relations

in which countries are forced to hand over key assets to service loans they can't make repayments on impairing their sovereignty. African countries are often characterized as being the weaker partner in bilateral relations with Beijing, with US officials repeatedly warning nations to be wary of so-called Chinese debt trap diplomacy,in which countries are forced to hand over key assets to service loans they can't make repayments on impairing their sovereignty.

But in recent days, African governments have been quick to demand answers from Beijing on the treatment of their citizens.

On Saturday, Nigerian lawmaker Oloye Akin Alabi posted a video on Twitter of the Chinese ambassador to Nigeria, Zhou Pingjian, being grilled by a Nigerian politician over the mistreatment of Africans in Guangzhou.

During the exchange, Zhou is made to watch videos of Africans allegedly being mistreated in China. Oloye accompanied the video with the message that his government would "not tolerate maltreatment of Nigerians in China."

The governments of Uganda and Ghana also reportedly summoned their respective Chinese ambassadors over what the Ghanaians called "the inhumane treatment being meted out." Meanwhile, the Foreign Ministry of South Africa, which is currently chairing the African Union, said it was "deeply concerned" by the reports.

On Saturday, in perhaps the most serious sign of continent-wide discontent, Moussa Faki Mahamat , chairperson of the African Union Commission, tweeted that he had invited the Chinese ambassador to the AU to personally discuss the allegations of mistreatment

The Chinese reaction

On Sunday, Chinese Foreign Ministry Spokesperson Zhao Lijian responded to the crisis, promising that provincial authorities would attach "great importance" to the concerns of some African countries and work to improve quarantine measures, including providing special accommodation for foreigners required to undergo medical observation.

Our attitude is clear, firm & consistent: ZERO tolerance for racial discrimination. NOTHING can change such a position. Communication, including constructive criticism is welcome. That will help any party concerned to improve its working methods & reduce misunderstanding. https://t.co/CoxINwnmJm — Chinese Ambassador to Zimbabwe (@China_Amb_Zim) April 11, 2020

However, echoing city officials in Guangzhou, Zhao did not address specific accusations that authorities had enforced a policy of mandatory testing and a 14-day quarantine on all Africans, even when they had not left China in recent months; had not been in contact with a known Covid-19 patient; had just completed a 14-day isolation; or had certificates to show they were virus-free.

Chinese state media had previously reported that five Nigerians tested had positive for the virus in Guangzhou.

Local police said on Sunday that all foreigners must strictly abide by Chinese laws and those who refuse to show identification when requested by police would face punishment. Suspicions abound that many Africans are overstaying their visas in Guangzhou, where officials said they counted 4,553 Africans legally living in the city as of last week.

On Sunday, the state-owned Global Times broke its silence on the continued diplomatic fallout, writing that "viral reports in Western media alleging Africans are being discriminated against and badly treated in the city" were "used by some Western media to provoke the problems between China and African countries."

In recent years, legions of Chinese diplomats have joined Twitter, a social media platform that is banned in China.

In Africa, CNN counted at least 25 accounts belonging to Chinese diplomats or consulates. But those Twitter accounts, which have repeatedly championed China's aid efforts in Africa in recent weeks, had been notably quiet on the issue of the African diaspora in Guangzhou.

After Zhao's statement on Sunday many began to tweet his comments.

Lina Benabdallah, assistant professor in politics at Wake Forest University, specializing in China-Africa relations, said that the "delicate" nature of the issue required a "coordinated response," as Chinese diplomats would need to prevent a backlash against the more than 1 million Chinese currently living in Africa.

"De-escalation in that sense is probably a priority," she said. "It's a sensitive thing."

People to people relations

By the end of the weekend, most of the displaced Africans in Guangzhou, mainly traders and students who make up China's largest African population, had found shelter, according to people CNN spoke to in the city.

Armies of volunteers who had assembled on WeChat, a Chinese messaging app, had rallied to connect Africans with landlords and hotels who would still accept foreigners. Others had been rounded up by local authorities and taken into quarantine at government-assigned hotels, according to Africans and volunteers who spoke to CNN.

"They (the authorities) just don't want them on the street," said one volunteer, who asked not to be named for fear of government reprisals.

A video of Africans in San Yuan Li, in Guangzhou, shot on April 9, 2020.

Shen Shiwei, a non-resident fellow at the Institute of African Studies at Zhejiang Normal University, said people-to-people relations were a linchpin of China's relationship with Africa, and needed to be protected.

Shen called on Chinese officials to improve communication with the African diaspora in Guangzhou, suggesting signs in English and local languages to help explain decisions in policing. "I think there are two sides to every story," he said.

Hannah Ryder, a British-Kenyan who used to work for the United Nations in China and is now CEO of a Kenyan owned company in Beijing, said these types of incidents can have a massive impact on how people in Africa view China. "If they are not handled properly they can result in far larger consequences than people sleeping on the street. They can have repercussions on international relations, trade and even diplomacy," said Ryder.

"As China has been the first to deal with and recover from Covid-19 the world can learn a lot from China's experience," she said.

"I hope that when it comes to virus-related xenophobia, China can show leadership on the best way to tackle it and be an example the world can follow."