A district police chief and two other policemen were transferred after an officer and a civilian were killed in mob violence over alleged cow slaughter in northern India, reports said Saturday.

Inspector Subodh Kumar Singh was killed when villagers, many of them activists from hardline Hindu groups, clashed with police in Uttar Pradesh state's Bulandshahr district on Monday.

They were protesting the alleged inability of police to stop cow slaughter, claiming that carcasses of animals including cows were found in the region. An 18-year-old also died in the rioting.

India's Hindu majority regards cows as holy and their slaughter is banned in most Indian states. There have been a string of attacks by right-wing Hindus over cattle slaughter and beef consumption in the country.

The state home department transferred Bulandshahr police chief KB Singh and two more policemen after an internal probe admitted lapses and indicated police inaction had led to the escalation in violence, broadcaster NDTV reported citing official sources.

The report found the police had failed to respond in time or sending adequate reinforcements after the animal carcasses were found.

Meanwhile, authorities were investigating reports that an off-duty army soldier could have shot dead the police officer during the violence. Four people have been so far arrested in the case.

According to data analytics site India Spend, almost 80 cases of cow-related violence were reported between 2012 and 2017. Ninety-seven per cent of these occurred after the Hindu nationalist Bharatiya Janata Party came to power in 2014.