NEW DELHI — Narendra Modi, India’s prime minister, has cultivated and cowed large parts of the country’s normally raucous news media in recent years as part of a broader campaign against dissent.

One group remains untamed: A relatively new generation of scrappy, online-focused news outlets. With names like The Wire, The Print, The Scroll, and NewsLaundry, these publications lack big corporate owners that Mr. Modi’s party can court. They also don’t depend on government advertising money that officials can threaten to withhold.

Now, the platforms say, Mr. Modi is working to rein them in, too.

India’s media outlets had until Saturday to comply with new government rules that they say will force them to change or take down content if online trolls mount a concerted campaign of complaints against their coverage. It would also give the government sweeping new powers to quickly take down articles or other material.

The rules, they say, will force them to toe Mr. Modi’s line or close their doors as the prime minister pushes his most ambitious and controversial initiatives.

“They run us down,” said Siddharth Varadarajan, editor of The Wire, which like other media outlets is fighting the new rules in court. “They call us purveyors of fake news, et cetera. But the fact is that they are threatened by the inability to control the digital media narrative.”

Emboldened by his landslide second-term victory two years ago, Mr. Modi has moved swiftly to reshape India’s traditionally secular republic to match his vision of a Hindu-centric economic powerhouse.

To smooth the way, he has contained the country’s major newspapers and broadcasters. Siding with the government brings protection and business. By contrast, those that take a critical look at his party and support base face blackouts or tax investigations. Some journalists have been dragged to jail. International groups have said freedom of the press has eroded under Mr. Modi’s watch.

Still, while his efforts enjoy broad support in India, critics of his campaigns — from remaking the country’s money system overnight to changing citizenship laws to disadvantage Muslims — have found a home in the robust online space. Their potential audience is vast: India could have more than 800 million smartphone users by next year.

The four-month-old protests by farmers outside the capital of New Delhi illustrate that reach, and have given Mr. Modi’s government a reason to tighten its hold. The government tried to paint the farmers, who are worried about laws aimed at remaking the country’s farming, as part of an anti-national movement hijacked by foreign forces.

Aggressive media coverage and online critics have challenged that portrayal. The government has responded by threatening the critics and international platforms like Twitter.

In February, it also enacted online content rules that empower complainers. Online platforms must name a grievance officer who acknowledges complaints within one day and resolves them within 15. The complaint must be taken swiftly to a three-layer system, with a final stop at a government-appointed body that can order platforms to delete or change content.

The new rules also give the government emergency powers to take down content immediately if officials believe it threatens public order or the country’s security or sovereignty.

The rules apply to a wide variety of media, including streaming services like Netflix and Amazon. The full scope of the law is unclear; some people believe that it could apply to international news publishers like The New York Times.

The government has said it wants to protect average users from online abuse. Officials have cited the spread of deliberate disinformation, harassment of women, abusive language and disrespect of religious groups. Mr. Modi’s ministers have said the rules create a “soft-touch oversight mechanism” that would protect India and prevent “internet imperialism” by major social media platforms.

“Media freedom is absolute,” Prakash Javedkar, the minister of information and broadcasting, said. “But with responsible, reasonable restrictions.”

It is not clear whether India’s courts will preserve the rules. Critics argue that they are an overreach of current law and that many of their specifics are unclear. In a significant victory for them, a judge in the southern state of Kerala earlier this month barred the government from taking action against LiveLaw, an online portal that reports on courts, for noncompliance.

India’s small digital news outlets believe the law is aimed at silencing them. They fear they will be overwhelmed with complaints, leaving them vulnerable to trolls and concerted online campaigns. An online army of Modi supporters is often quick to pounce on critical content.

“It will be very easy to churn out hundreds of complaints on a daily basis,” said Ashutosh, who runs a YouTube news portal called Satya Hindi that gets about 300,000 viewers a day. “So organizations like ours, what will they do? If there are hundreds of complaints against us on a daily basis, our entire energy will be subsumed by that.”

Ashutosh, who goes by one name, oversees an operation that churns out about a dozen videos a day. Its talk shows, news bulletins and special reports are often critical of Mr. Modi’s supporters.

“That’s why I say this is an attempt to kill digital democracy,” Ashutosh said.

Mr. Varadarajan, the editor of The Wire, calls the new rules “a weaponization of the reader complaints.” He sees them as yet another effort by the government to keep him quiet. Over the past couple of years, he said, his journalists have been slapped with nearly a dozen police complaints and defamation cases meant to bog them down.

“In India, the cases are the punishment,” Mr. Varadarajan said. “The legal process you get entangled in effectively front-loads the punishment, even if you are inevitably found not guilty.”

He also said the government has put pressure on The Wire’s donors. When The Wire began six years ago, two thirds of its costs were covered by philanthropic donations, he said. Those donations have dropped amid the pressure, Mr. Varadarajan said. Its roughly 40 journalists now largely depend on reader donations to meet monthly costs of about $65,000.

Mr. Varadarajan trained as an economist at the London School of Economics and Columbia University before joining a Delhi-based newspaper. He rose to become the editor of The Hindu, an English language newspaper, before resigning in 2013 and two years later helping launch The Wire.

The ownership structure behind many Indian media outlets makes them too dependent on advertising and investors, he argues, influencing their editorial decisions. With The Wire — owned by the Foundation for Independent Journalism, a trust — he wanted to explore a different arrangement.

The Wire operates from a crammed southern New Delhi office. Mr. Varadarajan sits in a corner. To save money after India’s stringent Covid-19 lockdown last year, The Wire vacated a floor.

“We have all been downgraded,” he told a columnist one recent afternoon who had looked for him at his old office upstairs. “Cutbacks.”

Despite the modest quarters, the portal’s journalists have gone after some of the country’s most powerful people. They have questioned the sudden increase in the fortunes of the son of one Mr. Modi’s most important lieutenants. They have also scrutinized business deals that may have favored companies seen as friendly to the prime minister.

At a recent meeting at The Wire newsroom, the conversation ranged from coverage plans for state elections, to how to shoot video quickly, to how to balance working at home and in the office as coronavirus cases tick up.

But much of the talk focused on the new regulations. Mr. Varadarajan told his staff that The Wire’s first court hearing had gone well but that the authorities were watching the digital platforms closely.

“Now that you know they will be waiting for opportunity to latch onto anything, look at it as extra responsibility,” Mr. Varadarajan said. “We have to be 150 percent careful to not leave any wiggle room to troublemakers, to not make their life any easier.”