India is growing increasingly assertive in its efforts to control online communications, challenging Twitter and Facebook’s practices and threatening to set a precedent that could extend far beyond its borders.

The largest U.S. internet firms are fighting new Intermediary rules issued by Narendra Modi’s government in February that they say curtail privacy and free speech. Officials have demanded Facebook Inc. and Twitter Inc. take down hundreds of posts this year, divulge sensitive user information and submit to a regulatory regime that includes potential jail terms for executives if companies don’t comply.

While the administration’s push to exert more control over user data and online discourse reflects efforts globally to come to grips with tech giants and their enormous influence, the stakes in India are particularly high for internet firms because — shut out of China — it’s the only market of over 1 billion people up for grabs. Unlike authoritarian regimes such as Beijing, critics fear actions taken by the world’s largest democracy could offer a template for other governments to encroach on personal privacy in the name of domestic security.