YANN, a 31-year-old student from Kinshasa, does not wish to be seen speaking with a white foreigner. He fears attracting crowds of Indians, angered at the prospect that he might be complaining about India (he worries that similar, perhaps even angrier, crowds would appear if he were seen speaking to an Indian woman). He lives in one of the crowded villages that sprawl south through India’s capital, and the drive back to his windowless one-room flat happens to wind down Nelson Mandela Marg and cross Africa Avenue, official names given in a spirit of post-colonial camaraderie. Also on the way he passes the brick-strewn gully where an acquaintance, another Congolese named Masonga Kitanda Olivier, was beaten to death by three Indian men on May 20th.

Yann came to India three years ago to study IT networks. “On my second day here,” he says, “that’s when I realised, ‘I am black.’” People laughed at him, and called him “kalu” (“blackie”). Children point at him and treat him like a monster. Officials are no better: when he brought his documents to the foreigner-registration office, “They say, first thing, ‘When are you leaving? When are you leaving my country?’”

Until recently, though, he had felt physically safe. Then Mr Olivier was killed, and just days later four separate groups of Africans were publicly beaten in villages in the south of Delhi. Each attack has its own proximate cause (Yann thinks Mr Olivier was mistaken for an Ivorian friend of his who had made someone cross), but no one doubts that India’s resident African population has gone from feeling unwelcome to endangered.

Except, maybe, the government. V.K. Singh, a minister of state and retired general, tweeted complaints that the press were “blowing up [a] minor scuffle as [an] attack”. The foreign minister, Sushma Swaraj, clarified that the attacks were “criminal acts”, but were “not racial”. Goa’s minister for tourism chose this moment to opine that Nigerians make trouble in India and ought to be deported. African diplomats are outraged—not just at the attacks, but at what they see as official indifference. A statement on behalf of envoys from 42 African countries lamented the lack of “diligent prosecution”.

Africans have a long history on the Indian subcontinent. Ethiopians traded with south India in Roman times. African cavalrymen came to serve Islamic rulers; one of them, Malik Ambar, became a sultan in his own right. And the Portuguese brought slaves from east Africa, including some who escaped to form communities sprinkled along India’s west coast, adopting Indian language and dress while preserving elements of their earlier cultures.

But the current wave of globalised migrants is new, as are stereotypes that have followed them—that they are all drug dealers or prostitutes. In fact most Africans in India are middle-class; they come for higher education and medical care. In 2014 an estimated 20,000 Nigerians visited for medical treatment. According to the Association of African Students in India, around 25,000 Africans study in Indian public universities, attracted by high standards, low prices and the prevalence of English. In all, experts believe at least 40,000 Africans study and work in India, mainly in the large cities of Delhi, Mumbai, Bangalore and Pune.

Some Indians argue, absurdly, that as fellow victims of Western prejudice, they cannot be guilty of racism. Priyanka Chopra (now a star on American television) decries double standards in Hollywood—complaining that Indian actors are made to speak in stereotypical accents. But she herself played a character in a Hindi film whose descent to rock bottom is confirmed when she falls into bed with a black man. Last February, after a Sudanese driver hit an Indian woman with a car in Bangalore, a group of Tanzanian students were attacked; one was stripped and frog-marched through the streets. When she complained to a policeman, she says he told her, “You all look alike,” and implied that because they were both African she must know the man who hit the Indian with his car.

Anti-African prejudice may be linked to India’s stubborn, caste-related bias in favour of lighter skin. (Potential brides are advertised as having “rosy” or “wheatish” complexions.) The problems faced by Africans are not so different from those borne by light-skinned Indian nationals from the north-east. Other Indians sometimes call them “chinky”. Landlords sometimes refuse to rent to them; thugs occasionally attack them in the streets.

Money provides some insulation to professionals of African descent. Nelson Igunma, a Nigerian-American from New York who worked for internet start-ups across southern India, said he experienced some “micro-aggressions”—like being asked at a dinner party whether he plays basketball—but nothing worse. Now back in New York, he is looking for a way to return to India. Like Mr Igunma, Yann says he admires Indians for their intelligence and the richness of their culture. Still, he wakes up afraid every day: “I love India, but they don’t love us.”