San Francisco (CNN Business) In the 2010s, India's internet exploded . More than half a billion Indians came online in the 10 years to September 2019, according to the latest government data , and the country now has twice as many internet users as the entire population of the United States.

And Big Tech rushed to cash in.CEO Mark Zuckerberg andCEO Jack Dorsey both visited India and met the country's Prime Minister Narendra Modi , as didCEO Sundar Pichai andCEO Satya Nadella, both of whom were born and grew up in India. Nadella and Amazon's Jeff Bezos both made their second visits to the country as tech CEOs earlier this year.

All those tech giants, along with others includingand, collectively invested billions in their Indian operations, rolling out several "India-first" features and local language versions of their platforms. More billions came from their Asian peers like Bytedance and— mostly through investments in India's biggest startups.

But India is now making changes to the rules of operating in the country that could make the next decade much tougher for those global tech firms trying to profit from its massive market. A raft of regulations in the works will affect how companies — particularly foreign ones — collect and store data, sell products online and protect their users' privacy. With growing, government-backed internet shutdowns, their basic access to their users is being cut off in many parts of the country.

In perhaps a sign of the changing times, neither Bezos nor Nadella, the latter of whom recently criticized India's controversial citizenship bill, publicly met Modi during their visits this year.

With nearly 700 million internet users and almost an equal number of people yet to come online for the first time, India is too big a market to ignore. But the tightening of restrictions on foreign tech companies and government intervention in controlling the internet are sparking concerns that the world's largest democracy is becoming increasingly China-esque.

"A heavy-handed government that wishes to use technology to surveil its own citizens or control the narrative by curtailing their free speech and expression is not interested in using technology for the good but merely to control," says Mishi Choudhary, co-founder and legal director of New York-based tech advocacy group Software Freedom Law Center. "In such scenarios comparisons with the Chinese authoritarian internet are natural."

What India does next will likely have implications for the internet far beyond its own borders.

"India's potential and opportunity are undisputed, however its attempt to artificially ringfence itself from the global digital economy is concerning," says Jeff Paine, managing director of the Asia Internet Coalition, a tech industry group whose members include Google, Facebook, Amazon and Twitter. "We hope policy makers will take a holistic and long-term view."

Dealing with data

Most closely watched is a new piece of legislation that could place constraints on the way tech companies store and process data.

India's Data Protection Bill requires tech companies to tell users what data they are collecting and, in most cases, get consent from users to collect that data. It also imposes restrictions on what kind of Indian data can be stored outside the country.

The bill, currently making its way through India's parliament, is being compared to the European Union's data protection law, the GDPR , passed in 2018. And while it shares the aim of protecting user privacy and giving users more control over their data, advocates and experts are warning against the sweeping powers it gives the Indian government.

The proposed rules allow the government to exempt its own agencies from following them, meaning Indian authorities can effectively collect any personal data that they deem necessary.

"The current data protection legislation lacks people protection and gives government a supra interest over everyone," says Choudhary, adding that Indian regulations could force tech companies into a tough spot as they face growing distrust from users around the world about privacy.

"They will be forced to make the choice between privately kowtowing to all demands or resisting extra-judicial demands on their users," she said. "An informed, empowered user will not settle for any piece of technology that sells them to authorities without any legal basis."

The government can also define "critical personal data" that companies will be forced to store only in India. In theory, the government could compel companies to keep some user data within the country's borders and try to force them to hand it over to law enforcement.

"These are global companies, they're global operations, they're global products and services, and in many instances there's an actual need to have data move back and forth pretty regularly," said Jay Gullish, who heads tech policy at the US-India Business Council, an advocacy group linked to the US Chamber of Commerce that represents companies working in both countries. "I think the concern now is that the bill ... is clearly not along the lighter side of regulation," he added.

Gullish says some companies are holding off on investments in India until there is more clarity on the policy landscape.

"Companies don't want to have multiple operations, different processes in different countries," he said.

The last decade saw Silicon Valley's top executives woo India and its leader, Narendra Modi.

Facebook said it appreciated the Indian government's willingness to work with the tech industry on regulation (some of the more stringent restrictions on data storage have been watered down from when they were originally proposed in 2018).

"It's rare that there's ever a clear answer on what regulation should look like," Ankhi Das, the company's director of public policy in India, told CNN Business via email. "These are important decisions to get right as they impact millions of Indians that use the internet everyday."

In an interview with Indian news channel CNBC TV18 in Mumbai this week, Nadella said Microsoft would "fully conform to the laws" India puts in place, adding that the company has made investments to better localize data at its Indian data centers.

"I fully expect us to... have more regulation," he said.

Google has previously said restrictive rules on local data storage would hurt India's tech growth.

"I think data localization of any form slows down the internet economy and innovation in countries," Google's then-India head Rajan Anandan told CNN Business in late 2018. "We're hoping that India will be progressive."

Twitter CFO Ned Segal said on the company's latest earnings call earlier this month that it continues to "carefully balance our own company principles around data privacy and transparency with local regulation."

Google, Twitter and Amazon did not respond to requests for comment for this story. India's Ministry of Electronics and Information Technology did not respond to a request for comment.

Tightening the screws

The data bill isn't the only Indian regulation ratcheting up the pressure on big tech firms.

New e-commerce rules last year imposed several restrictions on Amazon and Flipkart (owned by US retail giant Walmart), clamping down on the steep discounts and exclusive deals that allowed them to dominate an Indian market that is forecast to be worth $200 billion by 2027. Another government proposal announced earlier this month would see a 1% tax imposed on every transaction on e-commerce platforms.

And earlier this year, India's antitrust regulator announced an investigation into the two companies over allegations of unfair business practices from local trade groups. Together, Amazon and Flipkart control nearly 70% of India's online retail market, according to recent estimates by Forrester Research.

Walmart WMT foreign companies. Reliance Jio, the digital juggernaut owned by India's richest man Mukesh Ambani, is And Amazon andcould also soon be staring down a powerful competitor that's unencumbered by the regulations they face asforeign companies. Reliance Jio, the digital juggernaut owned by India's richest man Mukesh Ambani, is making its own push into e-commerce

Bezos' second visit to New Delhi, in January this year, did not include an audience with Modi.

Constraining big global firms could backfire on India's broader e-commerce industry, says Paine.

"Overly prescriptive regulation and onerous compliance obligations ... would act as market barriers and stifle growth and competitiveness," Paine said, adding that they could also "significantly restrict consumer choice and access, creating a lag for Indian consumers behind global contemporaries."

India could also escalate its ongoing dispute with Facebook and its mobile messaging service, WhatsApp. The Indian government is expected to move forward with amendments to its technology laws that would force social networks and messaging platforms to trace individual messages that the government deems a threat. The proposed changes also require that social networks such as Facebook and Twitter take down "unlawful" content within 24 hours.

WhatsApp has repeatedly refused to make messages traceable , saying encryption and privacy are fundamental to its platform and adding any sort of backdoor for authorities is not possible.

"If this rule is implemented in India (and potentially copied by other nations) it could force companies to create two types of systems -- one that uses [encryption] and one that doesn't. Companies might well justifiably balk at the cost and complexity of that approach and simply build less secure systems," Hannah Quay-de la Vallee, a senior technologist at the Center for Democracy and Technology, an advocacy group, wrote in a recent blog post

"Alternatively they could remove themselves from the Indian market altogether, depriving 1.2 billion people of state-of-the-art internet security," she added. "Neither of these are good outcomes."

Restricted access

Along with onerous regulations, the basic infrastructure tech companies use to reach their users is coming under strain.

The blockbuster debut triggered a price war in India's telecom sector and brought average data prices down from $3 per gigabyte per month in 2016 to around 16 cents per gigabyte in 2018, according to the latest government data. India's internet boom was spurred on by a sharp drop in the price of mobile data — particularly in the last three years — thanks to Ambani and Reliance Jio. The Indian billionaire launched his mobile network in September 2016 and gave all new Jio customers six months of free 4G data , with cheap plans thereafter. Less than four years in, Jio now has over 350 million customers.The blockbuster debut triggered a price war in India's telecom sector and brought average data prices down from $3 per gigabyte per month in 2016 to around 16 cents per gigabyte in 2018, according to the latest government data.

It proved to be a game changer in India, where the average wage is less than $2,000 a year, and coupled with the introduction of cheaper smartphones , enabled hundreds of millions of people to come online.

Passengers use smartphones while sitting on a platform of a railway station in Mumbai, India, on Saturday, Feb. 15, 2020.

But India's telecom sector is now facing headwinds that could make it more difficult to connect the hundreds of millions of Indians that still don't have internet access. Struggling with debt and facing billions of dollars in government-mandated retroactive fees , the country's biggest mobile carriers have jacked up data prices by as much as 50%.

Even with the price hikes, mobile data in India is still among the cheapest in the world, according to Nikhil Batra, telecom analyst at research firm IDC. But the years-long price war is holding back investments in newer technologies like big data and artificial intelligence.

"All of the focus right now is on fighting the competition in the market, which is hurting the overall industry," Batra said.

And even relatively small changes in price could preclude millions of the poorest Indians from internet connectivity.

India has also shown a growing tendency to cut off the internet from those who already have it. An internet blockade in Indian-controlled Kashmir imposed last August is the longest ever in a democracy at around 175 days, according to Access Now, an advocacy group that tracks internet freedom. India restored the region's access to 2G mobile data and a few hundred websites in late January.

The Indian government has restricted internet access in many other parts of the country in recent months — including briefly in the capital city New Delhi amid protests against a controversial new citizenship law.

India has had 110 internet shutdowns since the start of last year, according to a tracker by the Software Freedom Law Center, and a recent report from Top10VPN estimated that those shutdowns cost the country more than $1.3 billion in 2019.

"India imposes internet restrictions more often than any other country," the report said.

The China model

India's internet growth was fueled in part by its relative openness compared to its larger northeastern neighbor — Google, Facebook and Twitter have been mostly shut out of China's tightly controlled and monitored internet, restricting their ability to reach the world's biggest online population.

And while India's internet is still largely open, its efforts to exert more control online have raised red flags.

"The divide between east and west on matters of internet governance — and more broadly, freedom of expression and open access to information — is stark," says Dipayan Ghosh, co-director of the Platform Accountability Project at Harvard University's Shorenstein Center on Media, Politics and Public Policy.

While Ghosh says privacy regulations and more protections for online citizens are necessary and long overdue, the possibility that India could move closer to China is "deeply troubling" for a country that still considers itself a vibrant democracy.

"The world is trying to move in the direction of democracy and openness, and a few countries are moving the other way — closing down pathways for exchange and suppressing threats to incumbent governmental power," he said. " Should India choose the latter path, it will doubtless rankle many around the world and spell trouble for India's standing, politically and economically."

Despite the growing obstacles, global tech companies are unlikely to stop treating India as a priority. They can't afford to.