Mr. Modi’s government has been even more openly hostile to civil society groups. It repeatedly denounces human rights and environmental activism as “anti-national” — a phrase that carries connotations of treason. The patriotic rage is a mask for a more pedestrian motive: punishing pesky critics. In 2016, what is normally a routine license renewal process was used to punish groups that have been critical of Mr. Modi or his policies.

The Lawyers Collective has been prominent among such groups. In 2015, Priya Pillai, a campaigner from Greenpeace India, was traveling to London to testify in the British Parliament about coal mining in central Indian forests by Essar Energy, a corporation registered in Britain. Federal officers pulled Ms. Pillai off her flight, arguing that her deposition would have hurt India’s “national interest.” Ms. Pillai went to court; the Lawyers Collective represented her.

The Collective also represented Teesta Setalvad, who has been campaigning for justice for the victims of sectarian riots in Gujarat in 2002, when Mr. Modi was the chief minister of the state. Ms. Setalvad has sought to put Mr. Modi and other Hindu nationalist politicians on trial for allegedly overseeing or participating in the violence. After Mr. Modi’s elevation to national office, Ms. Setalvad was accused of stealing donations meant for riot victims. In July, her home in Mumbai was raided by federal agents, and a few months later, Ms. Setalvad’s organizations lost their foreign funding licenses.

Since Mr. Modi rose to power, emboldened hard-line Hindu activists have assaulted cow traders and people suspected of eating beef, claiming to defend Hindu beliefs. In July, vigilantes stripped and flogged four Dalit, or lower-caste, men in Gujarat for skinning a cow. Many Dalits earn their livelihood from skinning dead animals and selling their hides to leather traders.

The assault prompted protests by Dalits and damaged Mr. Modi’s image among the group, about a sixth of the country’s population. A Dalit rights organization, Navsarjan Trust, played a leading role in the protests. On Dec. 15, the federal government canceled the foreign funding license of the Trust. Indian newspapers quoted unnamed officials claiming that intelligence agencies have described seven civil society groups, including the Trust, as “working against public interest” and painting the Modi government as anti-Dalit abroad.

Some of these groups are seeking redress in Indian courts, which have largely been fair. But legal battles exact a cost: With bank accounts frozen for months during investigations, bills for rent, electricity and lawyers mount. People’s Watch, a human rights group, was unable to pay salaries for 23 months. Many Greenpeace India employees took pay cuts in 2014. As court duels drag on, campaigns lag, research comes to a standstill and years of community mobilization dissipate.