(CNN)A black version of the Chinese flag swept across African Twitter earlier this month, as users replaced their avatars to express their anger at the government of China.
They were outraged not only by widespread reports of coronavirus-related discrimination against Africans in China, but also by claims on Chinese state media that the allegations were "groundless rumors."
Posting under the hashtag #BlackChina, Dennis Kiplomo, a nurse from Kenya, tweeted: "We expect the kind of hospitality we give to Chinese here in Africa, be reciprocated in their home country."
Another user in Kenya, Peter Kariuk, wrote: "We need a united Africa which will not be slaves of #BlackChina."
The southern Chinese city of Guangzhou has Asia's largest African population. While the exact number of Africans living in Guangzhou is unknown, in 2017 more than 320,000 Africans entered or left China through the city, according to state news agency Xinhua.
Last month, many Africans were subject to forced coronavirus testing and arbitrary 14-day self-quarantine, regardless of their recent travel history, and scores were left homeless after being evicted by landlords and rejected by hotels under the guise of various virus containment measures.
The incident caused a rupture in China-Africa relations, with the foreign ministries of several African nations -- and even the African Union -- demanding answers from China.
Yet China's official response stopped short of admitting that the discrimination took place -- or apologizing for it.
"All foreigners are treated equally. We reject differential treatment, and we have zero tolerance for discrimination," said Chinese Foreign Ministry spokesman Zhao Lijian. China's embassy in South Africa said in a statement: "There is no such thing as the so-called discrimination against Africans in Guangdong province."
The Global Times, a nationalist tabloid controlled by the Chinese Communist Party, went one step further, publishing an article titled: "Who is behind the fake news of 'discrimination' against Africans in China?"
Traditionally, Beijing has portrayed racism as a Western problem. But for many Africans, whose countries have in recent years become heavily economically entwined with Beijing, the Guangzhou episode exposed the gap between the official diplomatic warmth Beijing offers African nations and the suspicion many Chinese people have for Africans themselves.
And that has been a problem for decades.
No racism in China
The West only began really noticing -- and criticizing -- China's relationship with Africa in 2006, following a landmark summit which saw nearly every African head of state descend on Beijing.
Yet China's ties with Africa stretch back to the 1950s, when Beijing befriended newly independent states to position itself as a leader of the developing world and to counter US and USSR power during the Cold War era.
Beijing talked up its shared history of oppression by white imperialists, condemned South Africa's apartheid early on and gave aid to Africa even when China was a poor country. In 1968, Beijing spent the equivalent of $3 billion in today's money on constructing the Tanzam Railway in Zambia and Tanzania, and in the 1960s it began offering Africans full scholarships to Chinese universities.
The presence of African students in China was highly unusual.
Most foreigners fled China after the Communist Party came to power in 1949. When African students began arriving in significant numbers in the late 1970s, China was just beginning to open up to the world. The vast majority of people still lived in rural areas with no access to international media, and had not seen a black person outside of propaganda posters -- let alone met one.
From the beginning, clashes were reported across the nation.
In 1979, Africans in Shanghai were attacked for playing music too loudly, leading to 19 foreigners being hospitalized. After another fracas in 1986, this time in Beijing, 200 African students marched through the capital, shouting that Chinese claims of "friendship were a mask for racism," according to a New York Times report.
''The Chinese deceived us,'' Solomon A. Tardey, of Liberia, told the newspaper. ''We know the truth now. We are going to tell our governments what the truth is.''
China's then Education Ministry spokesman said: ''It is the consistent and long-term policy of the Chinese government to oppose racism." That response was echoed nearly word for word in a statement from the Chinese government responding to the fallout in Guangzhou last month.
A race riot in China
By 1988, a total of 1,500 of the 6,000 foreign students in China were African, and had been scattered to campuses around the country -- a tactic designed to dilute racial tensions, according to a 1994 report by Michael J Sullivan in China Quarterly magazine.
But the attempt didn't work, and on Christmas Eve that year anti-black tensions exploded in the eastern city of Nanjing, resulting in a mob of Chinese protesters running the Africans out of town.
After, the Chinese government claimed that African students had arrived at a campus dance armed with weapons, including a knife, and beat up Chinese guards, teachers and students after being asked to register their Chinese guests, according to the Jiangsu provincial yearbook.
The Africans maintained that when they tried to bring a Chinese friend into the dance, they were taunted with calls of "black devil" and a fight ensued, according to Sullivan.
Whichever account is true, what happened after has been well documented.
Later that night, about 1,000 local students surrounded the Africans' dormitory, after rumors swept campus that they were holding a Chinese woman against her will. Chinese students lobbed bricks through their windows.
After police broke up the scene on Christmas Day, about 70 African students decided to flee the campus and went on foot to the city train station, hoping to travel to Beijing where they had embassies. Other dark-skinned foreigners, including Americans, also fled, fearing for their safety.
On campus, rumors spread that the Chinese hostage had died.
At 7 p.m. on Christmas Day a mob of about 8,000 students from universities across the city began marching to the railway station, carrying banners shouting "severely punish the murderer" and "drive out black people."
As the mob closed in, police bussed out all the black
students to a nearby guesthouse, where they were held until several Ghanian and Gambian students were arrested for the fight at the campus dance.
The other Africans were bussed back to campus -- and warned not to go out at night.
Kaiser Kuo, an American-born Chinese guitarist in the Tang Dynasty rock band, and founder of media group Sup China, was studying at Beijing University of Language and Culture that Christmas, living on a dormitory floor with students from Zambia and Liberia. He remembers hearing about the race riots.
"They were angry with the Africans that apparently a Chinese woman's honor had been sullied," he said. "This is one of the things where the rumor just kept getting inflated. By the time it reached my ears, the version was that a Chinese girl had been raped to death, when of course there was no evidence of anything like that ever happening.
"As far as I can tell, it was more like an African man had asked out a Chinese girl."
The Nanjing event was not an outlier. In the city of Hangzhou, students claimed Africans were carriers of the AIDs virus in 1988, even though foreign students had to test negative for HIV before entering the country, wrote Barry Sautman in China Quarterly.
Then, in January 1989, about 2,000 Beijing students boycotted classes in protest against Africans dating Chinese women -- a recurrent lightning rod issue. In Wuhan that year, posters appeared around campuses calling Africans "black devils," and urging them to go home.
Kuo remembers: "You know, all around me, there was this real concern among the African students for this kind of rising xenophobia on the college campuses."
That created a problem for Beijing, Sautman wrote, as it undermined China's credentials as the leader of the developing world -- and the hostilities didn't go unnoticed back home.