Narendra Modi is to declare that his flagship sanitation programme has ended open defecation in India, amid accusations that the scheme has sparked violence and abuse.

India’s prime minister will make the announcement on Wednesday at an event in his home state of Gujarat, attended by 20,000 village chiefs and international dignitaries, according to the government.

But Modi’s claims about the success of his Swachh Bharat (Clean India) programme mask a bleaker reality, with reports of intimidation, harassment and violence. Last week, two low-caste children caught defecating outside were lynched.

The programme was launched in 2014 and sparked a flurry of toilet-building – more than 100m in five years. Politicians and Bollywood stars have participated in huge government publicity campaigns to promote the scheme, and children in rural schools have marched around villages singing about the public health benefits of eliminating open defecation. Numerous government and independent studies show that open defecation has dramatically declined.

But the programme has been dogged by criticism of overzealous government workers, volunteers and vigilantes using coercive tactics to help the government’s effort.

An Indian news channel reported that the children killed last week in Madhya Pradesh – a 12-year-old girl and a 10-year-old boy – lived in a small hut without a toilet, in a village that was declared open-defecation free in April last year.

The mother of one of the children told India Today: “They were defecating in the open and that’s why they were killed.”

The toilet-building has led to huge advances in sanitation. An independent study of four states by the Institute of Labour Economics found that, between the programme’s launch and the end of 2018, the number of people who admitted to defecating in the open declined from 70% to approximately 40-50%, reducing open defecation on average 4% faster than before the programme was launched.

A researcher who worked on the study said it was “unlikely” that toilet usage had increased dramatically since the report was released, since local government officials had spent much of the past few months organising India’s elections, which took place in May.

The report was disputed by India’s government, who said in January that rural toilet usage was 93.4%. Academics and opposition parties have accused the government of “fudging data” to meet the government’s ambitious targets.

More than half of interviewees for the independent study said the programme had led to abuse. A report listed a number of alarming incidents. One video showed a woman screaming as she was dragged into a car by village “motivators”. Another showed men holding their ears and doing sit-ups surrounded by police officers and government staff as a punishment for open defecation. The study also listed local news reports documenting attacks against open defecators, and showed hoardings in one district that warned: “If you defecate in the open, you will soon get death.”

Sangita Vyas, a research fellow at the Rice Institute, said: “For Swachh Bharat to have made huge progress, they would have needed to address caste hierarchies and beliefs in purity and pollution. We found that it seems to have exacerbated caste hierarchies. Sanitation is used as a method for elite groups to suppress marginalised communities.”

Concerns were also raised in a report last year by the UN special rapporteur for safe drinking water and sanitation, Leo Heller. “As an unintended consequence of the desire to obtain rewards, including the title of ‘open-defecation free’, some aggressive and abusive practices seem to have emerged,” he wrote.

Heller reported that “individuals defecating in the open are being shamed, harassed, attacked or otherwise penalised,” and that accused open defecators faced being denied food rations, or having their electricity disconnected.

Heller also noted the Indian government “recognised the existence of abuse associated with the Clean India mission implementation and issued at least two advisories to all states underlining that such practices must stop”.

Despite rapid economic strides in past decades, India has lagged behind other countries on sanitation. Academics have argued that the practice of open defecation has survived because cleaning toilets is considered low-caste work.

The killings of the two children in Madhya Pradesh occurred hours after Modi received an award in New York from the Bill and Melinda Gates Foundation for the Clean India programme. News of the award was met with protests and has reinvigorated debates about the role western governments and philanthropic organisations have played in boosting Modi’s profile.

It led one Gates Foundation employee, Sabah Hamid, who worked in the organisation’s India office, to resign in protest. Speaking to the Guardian about her decision, Hamid said she was “incredulous” when she learned about the award. “It seemed contrary to everything the foundation works on and claims to believe in,” she said.

During the award ceremony, a map of India projected on to a screen turned green, showing that the country was due to become open defecation free by 2 October. A video that played on stage flashed up a quote from India’s founding father, Mohandas Gandhi, saying: “Sanitation is more important than political independence.”

The Gates Foundation did not respond to requests for comment, but has previously said: “Before the Swachh Bharat mission, over 500 million people in India did not have access to safe sanitation, and now, the majority do. There is still a long way to go, but the impacts of access to sanitation in India are already being realised.”

An email sent to India’s foreign and home ministries went unanswered.