Facebook has enjoyed unparalleled reach in India for more than a decade. But as China’s fast-growing ByteDance emerges as a formidable competitor in what has become the world’s second largest internet market, the American social media giant has found the horse it wants to bet on in the new decade.

The world’s largest social media company announced today it has invested $5.7 billion for a 9.99% stake in India’s Reliance Jio Platforms, a three-and-a-half-year-old subsidiary of the nation’s most valued firm, Reliance Industries, and the biggest telecom operator in the country with more than 370 million subscribers.

The deal, which valued Jio at a pre-money valuation of $65.95 billion, makes Facebook the largest minority shareholder in the Indian telecom network. (Prior to Wednesday, Reliance Industries referred to its telecom subsidiary as Reliance Jio, but is now calling it Jio Platforms to better represent a range of other services that the Indian giant runs within Jio brand.)

The social giant said the investment marks its “commitment to India”, where it will focus on collaborating with Jio to create “new ways for people and businesses to operate more effectively in the growing digital economy.” This is the largest investment for a minority stake by a technology company anywhere in the world and the largest foreign direct investment in the technology space in India.

One possible collaboration could be, said David Fischer, Chief Revenue Officer at Facebook, and Ajit Mohan, VP and Managing Director of Facebook India, bringing together JioMart, an e-commerce business that is a joint venture between Jio and Reliance Retail (nation’s largest retail chain), with WhatsApp, which counts India as its biggest market with more than 400 million users. It’s also the most popular smartphone app in India. (Facebook’s marquee service reaches about 350 million users in India, it says on its website for brands.)

“We can enable people to connect with businesses, shop and ultimately purchase products in a seamless mobile experience,” they said.

[You can read our interview with Mohan on Wednesday’s announcement on Extra Crunch.]

Reliance Jio, which began its commercial operation in the second half of 2016, upended the local telecom market by offering bulk of 4G data and voice calls for six months to users at no charge. The telco kickstarted a price war that forced local network providers Vodafone and Airtel to revise their data plans and mobile tariffs; however, they struggled to match the offerings of Jio, which has become the top telecom operator in the country.

Reaching Jio’s users might interest Facebook, which attempted and failed to expand its free internet initiative, Free Basics, in India. (The company has since expanded Express Wi-Fi to India — though its potential and scale remains comparatively small.)

Reliance Jio also owns a suite of services including music streaming service JioSaavn (which it plans to take public), smartphones, broadband business, on-demand live television service JioTV, and payments service JioPay.

“We’re making a financial investment, and more than that, we’re committing to work together on some major projects that will open up commerce opportunities for people across India,” said Mark Zuckerberg, co-founder and chief executive of Facebook, in a post.

In recent quarters, Facebook has started to take interest in Indian startups. Last year, the firm made an investment in social commerce Meesho; and earlier this year, it wrote a check to edtech startup Unacademy. Facebook has invested around $15 million each in these two startups.

Mohan told TechCrunch in an interview last year that the company was open to engaging with startups that are building solutions for the Indian market for more investing opportunities. “Wherever we believe there is opportunity beyond the work we do today, we are open to exploring further investment deals,” he said. Though a multi-billion dollar investment comes as a surprise.

But for Facebook, there might be an additional perk in this deal: Mukesh Ambani. India’s richest man is a close ally of Indian Prime Minister Narendra Modi, and his firm has consistently supported policy proposals from the ruling government. Just so it happens, Facebook has received more scrutiny than ever in India in recent years under Modi’s government.

In a video message, Ambani said, “At the core of our partnership is the commitment that Mark Zuckerberg and I share for the all-around digital transformation of India and for serving all Indians. Together, our two companies will accelerate India’s digital economy to empower you, enable you, and to enrich you.”

“The synergy between Jio and Facebook will help realise Prime Minister Shri Narendra Modi’s ‘Digital India’ Mission with its two ambitious goals — ‘Ease of Living’ and ‘Ease of Doing Business’ – for every single category of Indian people without exception. In the post-Corona era, I am confident of India’s economic recovery and resurgence in the shortest period of time. The partnership will surely make an important contribution to this transformation,” he said in a statement.

Ambani added that JioMart and WhatsApp will enable 30 million neighborhood stores (kirana) to transact digitally “in the near future.” WhatsApp has been working with the Indian government for more than two years to expand its payments service in India — but the project remains stuck in regulatory hurdles.

For more than a decade, the Indian market has been a duopoly between Facebook and Google. Reliance Jio has built consumer-facing services, but very few that compete directly with either of the American giants’ core offerings. But in recent years, ByteDance’s TikTok has won users that all of these companies have struggled to reach. TikTok has amassed more than 250 million users in India (as of last year), and the company says it is on track to add another 100 million this year.

Jayanth Kolla, an analyst with Convergence Catalyst, said TikTok blindsided Facebook and reached users that the American company hadn’t yet. Facebook has, predictably, attempted to build a similar service called Lasso. But it’s currently testing it in limited markets, and India is not one of them.