China is striving for global leadership, and has the economic clout to realize its vision.

China has spent the last few days trying to manage a damaging story about how local authorities in the city of Guangzhou have been targeting black African migrants for eviction and forced coronavirus testing.

The story rapidly went global after numerous videos and images of Africans being evicted, blocked from hotels or even being barred from a local McDonald’s went viral on social media platforms including Twitter, Facebook and WhatsApp.

Beijing had tried to downplay the videos but was quickly put under diplomatic pressure by the governments of Nigeria, Ghana, South Africa, Kenya, Uganda and the African Union in an unprecedented forceful response from African governments in China-Africa diplomacy.

Nigeria’s speaker for the house of representatives called in the Chinese ambassador to complain in no uncertain terms about the treatment of Nigerians while Ghana’s foreign minister described the incidents as “inhumane treatment”.

According to Chinese state media, five Covid-19-infected Nigerian men broke quarantine and infected others. These reports seem to be what sparked the current wave of suspicion and anti-foreigner sentiment in the city.

Even migrants who have not left China since the outbreak began in the city of Wuhan in December have been forcibly tested, moved into quarantine or evicted from their homes. According to Xinhua, the state news agency, 111 Africans have now tested positive for the coronavirus in Guangzhou out of a total of 4,553 tested. The report claimed 19 of the cases were “imported” though it doesn’t explain where the cases originated.

China does have a list of 25 named “high risk nations”, including the United States and several European countries concerning coronavirus, but there are no African countries on the list.

Over the last decade, China’s third-largest city has become home to one of the largest African communities in Asia because it is a trading hub where African business people can easily trade goods to be exported to the continent.

The response from Beijing had initially been to deny the reports describing them as “rumors” and “misunderstandings” spread by Western media. This is despite the fact local media in African countries were the first to report on the issue. As more evidence spread on social media late last week, China even sought to blame rival countries especially after the US State Department warned African Americans to avoid travel to Guangzhou.

“It is irresponsible and immoral for the US to sow discord,” foreign ministry spokesman Zhao Lijian said at a briefing. “Its attempt to drive a wedge between China and Africa will never succeed,” he added.

Now, the Chinese government is hoping to downplay the gravity of the issues and start the process of repairing the damage. State media on Tuesday described the incidents as “small rifts”. Officials have also made PR visits to quarantined Africans with flowers and food accompanied by television cameras.

Even though there has not been an official apology rendered, Chinese envoys have continued to reassure their African counterparts they are going to correct the “misunderstandings” and establish “an effective communication mechanism with African Consulates-General in Guangzhou,” a statement from the embassy in Ghana said.

“We can see that the Chinese government has shifted its position and said that Guangzhou [local officials] specifically need to change what they were doing and they have issued some kind of verbal statement but they haven’t said what specifically they are going to do,” says Hannah Ryder, CEO of Beijing-based Development Reimagined.

China is desperate to make this diplomatic race row go away quickly and quietly and shift the focus onto the extraordinary lengths it is going to help end the coronavirus pandemic.

But events over the past week have once again put racism in China into the spotlight. In 2018, a skit on state television during the Spring Festival Gala featured characters in blackface and was also criticized for portraying China as Africa’s savior.

“There have been flare-ups over race going back to the 1980s and also Guangzhou, in particular, has always been a difficult setting for African migrants in particular,” Ryder says. However, she is quick to add that this is not a uniquely Chinese problem. “Around the world, there is a race problem [and] that doesn’t go away when you get to China.”

While China has not dealt with a diplomatic row with Africa on this scale, Ryder says it is unlikely to severely damage the strong relations that have been cultivated over many years.

If anything, it demonstrates “the rising African agency…and that is spilling over in the Chinese relationship.”

Sign up to the Quartz Africa Weekly Brief here for news and analysis on African business, tech and innovation in your inbox