Two Bharatiya Janata Party ministers in Jammu and Kashmir government, Chaudhary Lal Singh and Chander Prakash Ganga, on Friday resigned from their posts following criticism over the rape of a minor girl in Kathua. The two legislators had attended a rally that supported the men accused of the crime earlier this year.

Singh, an MLA from Basohli constituency, was the minister for forest, environment, ecology. Ganga was the minister of industries and commerce and MLA from Vijaypur constituency in Samba.

“When we met people, they demanded CBI inquiry into the case, we had simply put it across being people’s representatives,” Singh told ANI. “Now, such a perception is being created that I deemed it fit to tender my resignation.”

BJP General Secretary Ram Madhav said there was indiscretion on part of the two ministers who were under pressure of the local public when they spoke at a gathering. “I immediately flew to Jammu as soon as I got to know and told the party that we should fully support the investigation,” Madhav said. “We actually acted very fast. The state government and the police acted swiftly.”

He accused the Congress of politicising the matter and alleged that the party was behind the agitations in Jammu. He also denied any trouble in alliance with the Peoples Democratic Party. “We are in touch with [Chief Minister] Mehbooba Mufti. She is of the view that the BJP should take a stand. The prime minister has also advised us to take appropriate action to send a right message to people,” he added.

Their resignations came soon after Prime Minister Narendra Modi condemned the incident in Kathua and the rape of a teenager in Unnao in July 2017, in which an Uttar Pradesh legislator is accused. “As a country, as a society, we all are ashamed of it,” Modi said in New Delhi. “I want to assure the country that no culprit will be spared, complete justice will be done. Our daughters will definitely get justice.”

Earlier on Friday, BJP leader Meenakshi Lekhi appeared to defend the two Jammu and Kashmir MLAs. “They should not have protested,” she said. “They should have ideally not commented until an investigation was conducted.” But the MLAs were “misguided”, she added.

In the Kathua case, eight people including a juvenile have been chargesheeted for abducting an eight-year-old child, holding her captive in a temple, drugging and raping her repeatedly before murdering her. Her body was found in the forests near Rasana in Jammu and Kashmir on January 17.