Walmart has opened a new front in the war for e-commerce supremacy. But the battle won't happen here in the States. It will happen in India.

On Wednesday, the retail giant inked a $16 billion deal to buy a 77 percent stake in Flipkart, India's premiere online retail startup. And it's a move directly aimed at Amazon.

Walmart is still America's dominant brick-and-mortar retailer (there's a Walmart within 10 miles of 90 percent of the United States population). But most everyone agrees that internet sales are the future. And there, Amazon is still king, ruling over 40 percent of e-commerce market share. Walmart only has a bit over 3 percent — which, remarkably enough, still makes it one of the biggest e-commerce players that isn't Amazon. But everyone else is nipping at Walmart's heels.

Walmart has been scrambling to improve its e-commerce game for a while now: It bought Jet, another online retail startup, back in 2016. And its massive network of physical stores should give the company a leg up in building a delivery infrastructure.

Yet Walmart has failed to gain much ground against Amazon, at least here in America. Enter India.

India boasts a population of 1.3 billion. But only about 15 percent shop via the internet. There is tremendous potential here for an e-commerce powerhouse to clean up.

After all, e-commerce in India has been growing at a rapid clip. Experts anticipate online sales in the country will explode to $100 billion by 2020, up from a mere $3 billion in 2013. There are also 443 million Indian millennials, and their smartphone usage is anticipated to double in just three years. Then there's groceries: Indians already spend $1 billion a year buying food online, and that market is expected to expand massively.

All of which makes India one of the juicier prizes in the future of global retail.

"When you step back and look at the world and look at all of the countries — their size, their growth rate, their potential — there just aren't opportunities like the one we are looking at," said Doug McMillon, Walmart's CEO.

That brings us to Flipkart, one of India's biggest internet startups.

Flipkart, launched in 2007, boasts 80 million products for sale, 100,000 sellers, 100 million registered users, and 10 million daily page visits. Now, Flipkart did take a beating when Amazon broke into the Indian market in 2013. But Flipkart still holds an 8 percentage point lead in market share over its rival. And its sales grew by 50 percent in its last fiscal year.

Buying a controlling share of Flipkart places Walmart ahead of Amazon in India's relatively young internet retail world. And while Indian regulations prevent Walmart from opening U.S.-style retail stores to directly compete with domestic mom-and-pop operations, Walmart does have 21 wholesale stores in India that sell to those same mom-and-pop shops. That means Walmart already has at least some physical infrastructure in place.

Sounds great, right? Well, it's not a total slam dunk. And investors seem a little worried — Walmart shares took a dive after news of the sale.

After doubling in 2014 and almost tripling in 2015, growth in India's online retail market slowed way down in 2016. There's still a ton of room to grow — but how much, and how fast, remains an open question.

Walmart also acknowledges that Flipkart will need an upgrade: The company plans to invest $2 billion in its online retail purchase. And Walmart readily admits the deal will shave $750 million off its net income in 2018, and over $1.5 billion in 2019.

For context, though, Walmart's net income was $13.6 billion in 2017. They can certainly afford the risk for the moment. What will matter is the long game.

And what if India's online retail market does boom the way experts hope, and Walmart's early gamble to put itself ahead of Amazon pays off? Well, then those skittish investors will probably be happy to come back.