Politicians in western India have passed a bill aimed at debunking black magic and prosecuting religious charlatans after the death of an activist who campaigned for nearly two decades for the legislation.

Maharashtra is the first state to pass such a measure in multicultural and secular India, where witch doctors and Hindu holy men enjoy huge popularity and can amass millions in tributes from followers or fees for promised miracles and health cures.

The anti-superstition legislation allows police to investigate religious fraud, extremism and human sacrifice.

It was passed over the weekend following an 18-year debate and intense lobbying from Narendra Dabholkar, who was shot on 20 August after receiving death threats for encouraging villagers to embrace secular and scientific reason. Two people were arrested over the killing.