African ambassadors in Beijing have complained to the Chinese government about the discrimination being faced by Africans in China.

Imagine this TV advert for washing powder. A young black African man is attempting to chat up an attractive white Chinese girl without success. During the course of the conversation the girl persuades the man to swallow a pouch of the powder and he is then bundled into a washing machine. After a cycle of muffled screams from the machine, she opens the lid and a grinning white Asian man climbs out, much to the girl’s pleasure and delight. The message is crystal clear; if you’re white you succeed, if you’re black you don’t!

Surely this outrageous example of racism couldn’t be broadcast? Well it was. When this advert was aired for months on Chinese television recently, it generated not the slightest internal criticism or debate. Zilch. That was until it was picked up and posted on an English-language website and within hours it had gone viral in disgust. The world became aware of the inherent racism in China.

It’s happening again. This time Chinese racism has been exposed by the discrimination and maltreatment of Africans brought about by the Covid-19 outbreak in the city of Guangzhou.

Having successfully combated the first wave of Covid-19, Beijing has become paranoid about any possibility of a second, this time heavily focusing on imported cases. The regime quickly closed the long border with Russia when returning Chinese were found to have the virus, but it now sees the greatest danger coming from the southern Guangdong province, with its large African population. Guangzhou, the capital, is closely linked to Hong Kong and Macau, and houses the largest African community in Asia. It’s even known as “little Africa”, with an estimated 150,000 Africans living in the city.

Local newspapers in Guangzhou have reported a total of 119 imported cases of Covid-19, mostly from Africa. Resident Africans have become the top target of quarantine efforts and as a result local Chinese fear that all Africans in Guangzhou are infected and contagious. This has led to an eruption of local resentment, evictions and maltreatment. Shops in the city have refused to serve “black people”, and there have been pictures of evicted African nationals having to sleep on the streets.

The city of Guangzhou and the government in Beijing are now facing a full-blown diplomatic crisis and a PR disaster amid accusations of racism. A group of African ambassadors in Beijing has written a letter of complaint to the Chinese government about the stigmatisation and discrimination being faced by Africans in the country. Other African diplomats, facing domestic pressure, have held discussions with representatives from China’s Ministry of Foreign Affairs, emphasising their dissatisfaction. In many African countries, in particular Ghana, Kenya and Nigeria, internet users have seen pictures of black Africans being treated disgracefully. This has led some local politicians to demand that Chinese citizens in their country should be expelled back to China with immediate effect.

Many African countries have issued strong statements expressing their disappointment about the treatment of their nationals, given that for many years their diplomats have spoken up for China on the international stage. After all, many African governments have regularly supported China on issues ranging from its membership of the United Nations in the 1970s to the more recent territorial disputes in the South China Sea. The supreme irony is that many African governments are also supporting China in its current racist treatment of the Uyghurs in Xinjiang.

The danger for China is not only the potential loss of this valuable diplomatic support from African countries, but the effect the crisis could have on its Belt and Road Initiative (BRI) in the region.

China has used BRI to consolidate its relationship with no less than 37 African countries, with huge investments directed towards China’s strategic objectives of securing access to resources and absorbing excess capacity in construction and transportation. Mining and oil remain the focus of these investments, but they extend throughout all market sectors; everything from infrastructure in roads, rail and ports, to food processing.

Africa is also estimated to contain 90% of the entire world supply of platinum and cobalt, half of the world’s gold supply, two-thirds of world manganese and 35% of the world’s uranium, so it’s no wonder China wants to get its hands on these resources in order to monopolise supplies and maintain its economic growth.

It’s also no wonder that Beijing is rushing to contain this potential harm to its relationship with African countries. It will not be easy as racism runs deep in Chinese society. As Sino-African affiliation began to develop decades ago, there were reports in the western press about mass displays of social unrest in China against black Africans, culminating in extreme violence against them in Nanjing. “Chinese students hold racist rally” reported the New York Times on December 27, 1988. A few days later the Washington Post carried the headline “Chinese students continue to protest against Africans”.

The recent rumblings started in late February when in the midst of the Covid-19 crisis the government published draft regulations to ease conditions for foreigners to get permanent residency in China.

This was met with strong opposition online, accompanied by rising nationalist sentiment, with Africans regularly mentioned as the example par excellence of why foreigners should not be welcomed in the country. Then in early April a 47-year-old Nigerian man being treated for coronavirus, allegedly attacked a nurse by shoving her to the ground and even biting her face, while he tried to escape quarantine from a hospital in Guangzhou.

The Chinese social media platform erupted with xenophobic racist sentiment and abuse. In turn, videos of the mistreatment of Africans ricocheted around African broadcast and social media.

A desperate Beijing has begun to repair the diplomatic damage. Until recently, Africans have been charged $40-50 per day during quarantine, with an average charge of $2,500 for treatment. This has put many of them in an impossible position of either risking their health and those around them, or becoming bankrupt and then deported.

Last week, the government announced that it would adjust its coronavirus restrictions on African nationals, provide them with health services without discrimination and adjust accommodation prices for those in financial difficulties. Even in Guangzhou, community leaders have begun to realise the importance of treating Africans decently by sending them flowers and showering them with gifts.

Nevertheless, Beijing’s self-claimed “zero-tolerance” of racism is looking disingenuous and hollow, exposed by Covid-19. The hostile scenes from Guangzhou are sure to have broken many African hearts and their long-term effect on China’s soft power in Africa will be damaging.

John Dobson is a former British diplomat and worked in UK Prime Minister John Major’s Office between 1995 and 1998.