An African woman walks through a street in New Delhi. There are about 50,000 Nigerians living in India, say consular officials.Photograph: Saurabh Das/AP

India’s foreign affairs minister has condemned “deplorable” race riots targeting African students near Delhi this week that put two men in hospital and led to seven arrests.

The victims included a Kenyan woman who alleges she was pulled from a rickshaw on Wednesday morning and beaten by a group of men.

Police say at least 600 people were involved in the mob violence on Monday in and around Noida, a satellite city to the east of Delhi.

Resentment towards Africans, thousands of whom study in Indian universities, has simmered in India in the past few years, fuelled partly by cultural differences and the involvement of a small proportion of people from the continent in the Delhi drug trade.

A number of opinion pieces in the Indian media have also attributed the attacks to racist attitudes towards foreigners from African countries.

Monday’s violence was triggered by the death of Manish Khari, 19, who reportedly died of a heart attack brought on by a drug overdose.

Nigerians living in the neighbourhood were blamed by some locals, including Khari’s family, for selling the man the narcotics. Five Nigerian men were arrested but released the next day.

There were protests by African student groups on Sunday and counter-demonstrations by locals calling for justice in the case. One, a candlelight vigil calling for the prosecution of the five Nigerian men, turned violent on Monday night.

At least four Nigerian men were attacked by the crowd, some of whom carried sticks, including Amalcima Amarawa and his brother Endurance, who told the Indian Express they fled into a shopping centre to escape.

A group of at least 10 people found them inside the mall and savagely beat the pair in an attack that was recorded on a smartphone, broadcast and shared across India on Tuesday.

Sushma Swaraj, the Indian external affairs minister, called the violence “deplorable” and urged the new chief minister of Uttar Pradesh, Yogi Adityanath, to conduct a fair investigation.

African students were advised by police to stay indoors temporarily, while Indian foreign affairs officials said they were in contact with the Nigerian high commission over the incident.

“The government is committed to ensuring safety and security of all foreigners in India,” the minister of external affairs said. “People from Africa, including students and youth, remain our valued partners.”

There are about 50,000 Nigerians living in India, consular officials have said.

Violence against Africans living in Delhi had diplomatic implications last year after a 29-year-old Congolese man was stoned to death in south Delhi, reportedly after arguing with a group of locals over a rickshaw.

Three more attacks on African expats in the days that followed prompted envoys from the continent to threaten to boycott Africa Day ceremonies held each year by the Indian government.

They eventually agreed to attend but the ructions led Swaraj to announce a “sensitisation programme to reiterate that such incidents against foreign nationals embarrass the country”.

Last year in Bangalore, another hub for African students, a 21-year-old woman from Tanzania was stripped and assaulted by a mob in retaliation for a Sudanese student accidentally running over a local woman.