Speaking during the centenary celebrations of the Sabarmati Ashram in Ahmedabad in his home state, Modi said: "Killing people in the name of gau bhakti [respecting and worshipping the cow as a mother and goddess] is not acceptable. This is not something Mahatma Gandhi would approve of."
He added: "We are the land of non violence. We are the land of Mahatma Gandhi. Why do we forget this?"
Referring to several instances of when overzealous cow vigilantes took it upon themselves to discipline people who they believed were cow smugglers, the prime minister also said: "No one has the right to take the law in his or her hands."
Anger against cow vigilantes
The statement comes a day after several political parties and sections of society protested across the country as part of the "Not In My Name" campaign.
They were protesting against the killing of several people — mostly Muslim — over the past few months in the country because they were accused of either consuming or possessing beef or smuggling cows.
Violence — or threat of it — in the name of cow protection has come out in the open in recent times. It has received a boost from certain ultra-right Hindutva figures, who have called for more protection for cows, whom Hindus consider a god.
The BJP has been mostly silent on the issue, but perception is that the saffron party is all for the protection of cows, and has not often been seen reining in elements from within as well as from other right-wing hindu outfits for going overboard with their cow-protection agenda.
Cow slaughter ban
What has further complicated matters for the BJP and the NDA government it leads at the Centre is a law that bans the sale of cows for the purpose of slaughter.
The law has been construed by many as a de-facto ban on beef in a country that has around 20 crore Muslims who rely on that meat as a cheaper source of protein.
Several courts have been aproached against the law, but none has so far entirely overturned it.