If India is in competition with China for a toehold in Africa, as geopolitical experts say, the past week’s racist attacks on the streets near New Delhi must have set it back far behind its northern neighbour.

For three years in a row, India has been in the news for racist attacks against African nationals. The latest came last week after a local boy died of suspected drug overdose in Greater Noida, a satellite town of the Indian capital. Police had detained five Nigerians after parents of the boy accused them of supplying the drugs. However, when they were released due to a lack of evidence, the local people turned on them. Hundreds of people joined the rampage. Another violent mob attacked two African students outside a shopping mall in Noida.

“These attacks will affect bilateral ties adversely. It will damage recent Indian initiatives to promote people-to-people contact under India-Africa forum summit initiatives,” said Ajay Dubey, a professor at the Centre for African Studies in India’s premier Jawaharlal Nehru University.

India was quick to condemn the attacks as “deplorable” and Foreign Minister Sushma Swaraj promised an “impartial” inquiry into the attacks. She also assured a “fair and impartial investigation” into the incident. “It looks racially motivated,” senior police officer Sujata Singh told reporters.

Last May, a Congolese national was stoned to death in a road-rage dispute in Delhi. Around 12 Africans were attacked in south Delhi over their “free lifestyle” the same month. In October 2014, a mob attacked African students at a central Delhi metro station. In January the same year, a lawmaker led a mob to an African ghetto in South Delhi, ostensibly to bust a sex and drug racket. Four African women, two from Nigeria and two from Uganda, were attacked by the mob although the drug racket allegation could not be substantiated.

Over the years India, an attractive destination for Africans for higher studies and medical tourism, has been wooing Africa for business opportunities.

About 40,000 Nigerians visited India in 2015, half of them for medical reasons. India’s pharmaceutical exports to Africa increased from US$247.64 million in 2000 to US$3.5 billion in 2014.

India’s education sector has been reaching out to Africans as well. In 2013, African students formed 13 per cent of India’s total foreign-student population. In 2015, at the Indo-African summit that saw a high level of participation by all 54 African states, India announced concessional credits of US$10 billion to Africa over the next five years, a US$600 million grant plus 50,000 scholarships in India over five years.

The African diplomatic ripple that could stir a tsunami for Taiwan

According to data from the Ministry of Human Resource Development, Sudan and Nigeria are the fourth- and fifth-largest contributors to India’s foreign-student rolls. The UN says at least 11 per cent of visits by Nigerians to India are for educational purposes.

India also has trade interests and wider geopolitical goals in Africa. It has provided more than US$1 billion in technical assistance and training over the last few decades and pledged US$7.5 billion toward African infrastructure.

Keen to reduce its dependence on the Middle East, India gets about 17 per cent of its oil imports from Africa, and expects to get more. Africa’s 54 states are also key to India’s ambition of becoming a permanent member of the UN Security Council.

“Africa, particularly countries like Nigeria, Ethiopia, Tanzania, Ghana, etc, are a major source of remittances to India,” said Mohan Guruswamy, a distinguished fellow at the New Delhi-based United Service Institution of India, a leading military and foreign policy think tank. “Indians settlers also have vast trading and other intersects in Africa.”

Indian and Chinese companies are competing for market share in Africa, but annual trade between China and Africa exceed US$200 billion compared with India’s US$75 billion. With bilateral trade growing at 700 per cent in the 1990s, China is now Africa’s largest trading partner. According to China’s Commerce ministry, the country invested US$3.2 billion in manufacturing and other areas in Africa in 2016. Between 2000 and 2011, China invested almost US$75 billion through various infrastructure development projects, including buildings and dams.

“Racist violence in India will have consequences. It might trigger off retaliatory attacks in countries like Nigeria where we have large expat populations,” said Guruswamy. “We don’t have much edge over China beyond the fact we have been in Africa long before the Chinese even contemplated it. We also can communicate in English which is widely spoken in Africa, except in Francophone Africa. But the Chinese have much more money to spend and are doing so. They also implement projects on time. Our record is quite the opposite. In any case, whatever historical goodwill we may have is eroded by these attacks.”

Africans have been facing racism in China as well, though not so much by way of violent mob attacks. A Chinese People’s Political Consultative Conference member recently told reporters his plans to “solve the problem of the black population in Guangdong”, adding that “Africans bring many security risks”. Hundreds of supportive comments on social media followed about the dangers of a “black invasion”. Last year, a Chinese TV ad for a detergent featured a Chinese woman stuffing a black man into a washing machine to turn him into a Chinese man.

India has a long history in Africa, playing a crucial role in the movement against apartheid in South Africa by refusing to maintain diplomatic relations in the 1990s. It could have positioned itself as a more conducive Asian country for African visitors. But as the number of Africans on its soil grows, the inherent racial biases seem to become more pronounced.

Racist attacks against Africans in India are based on skin colour, a prejudice over their lifestyle and suspicion over alleged involvements in the illegal drug trade. Indians are also not very familiar with African culture – Africa is not a very popular tourist destination among Indians.

An ethnic tribe of at least 20,000, descendants of the Bantu people of East Africa, has been living in small, isolated pockets in India for centuries. Known as Habshis – a term still widely used to refer to all black people – they came to India as traders or were brought as slaves. Africa, too, boasts of a million-plus Indian diaspora. As of January 2015, the number of Indians and people of Indian origin living in Africa was estimated at 2.76 million, according to a United Nations Economic Commission for Africa and Confederation of Indian Industry report in 2015.

Is China railroading Kenya into debt?

This unfamiliarity feeds into with Indians’ instinctive dislike of dark-skinned people to create openly racist behaviour, leading to dangerous mob situations. A quick dip into Indian mythology reveals how racism based on skin colour has been normalised in India for centuries now. Most gods and kings and heroes are fair-skinned, while demons and villains are depicted as dark-skinned.

Soon after the attacks, the Indian foreign ministry said in a statement that India “is committed to ensuring safety and security of all foreigners in India. People from Africa, including students and youth, remain our valued partners.” But the alarming frequency of racial attacks against Africans in India is a wake-up call for India to go beyond practised official rhetoric and take concrete action to ensure they stay truly safe on its soil.

“India needs to create more awareness about Africa and its importance to India. There is need for a law to penalise racial attacks such as these,” Dubey said.

In 2015, India’s home ministry had said it will introduce an anti-racism law to address race-related violence, to be punishable with a maximum of three years in jail and a fine. It might be time to dust the files and enact that law.