India will soon be the world's most populous country, and economists at PriceWaterhouse Coopers predict it will become the world's second-biggest economy by 2050, behind only China.

Given that expected growth, it's no surprise that Amazon (AMZN 0.83%) has already allocated $5 billion to the Indian market, with more investment dollars likely to come. Amazon and its founder Jeff Bezos are well-known for playing the long game, and after the company lost out in China to Alibaba by entering that market too late, it's committed to avoiding that same mistake in India. 

However, retail giant Walmart (WMT 0.26%) has its own ambitions in the region and is poised to close a deal that would put a major dent in its e-commerce rival's plan.

A Flipkart warehouse worker moves a cart of merchandise.

Image source: Flipkart.

The home-field advantage

Amazon's principal rival in India is homegrown Flipkart, the country's largest online retailer, which has taken investments from the likes of SoftbankTencentMicrosoft, and eBay. Add to that list of backers Walmart, which is in talks to take on a majority stake in the company.

In fact, something of a bidding war for Flipkart has broken out between Walmart and Amazon as both retailers see a rare opportunity to take control of an e-commerce leader and its market.

According to Bloomberg, Walmart is the frontrunner in the contest as Flipkart's board believes the brick-and-mortar retailer could close a deal faster and more easily than Amazon, which would pose more of an antitrust threat if it took control of Flipkart, now valued at $20 billion. Flipkart's founders, Sachin and Binny Bansal, also favor Walmart, because the retailer would allow the pair (no relation) to continue running the business.  

If the deal goes through between Walmart and Flipkart, it would serve as a key component of Walmart's India strategy and simultaneously hobble Amazon's ambitions in the region

Partnering up abroad

So while Amazon is trying to avoid the mistakes it made in China, Walmart is applying a lesson from its experience in that market to India. Back in China, Walmart ran into a number of challenges by failing to differentiate its product selection from city to city and suffering through fines and temporary store closures due to violations. In 2016, Walmart partnered with (JD 1.68%), the Chinese retailer, by selling its Yihaodian online retail site to in exchange for a 5% stake in the company. The two companies also formed a strategic alliance that boosted Walmart's brick-and-mortar business by making it a preferred retailer on's delivery platform, allowing Sam's Club to open up a shop on, and by integrating their supply chains together.

The strategy appears to have been successful as JD shares have nearly doubled since the announcement and the companies expanded their strategic alliance last year by adding JD pickup stations at Walmart stores and furthering their supply chain partnership, among other initiatives. 

Earlier this year, Walmart made a similar move with Rakuten, one of Japan's biggest e-commerce companies, forming a strategic alliance to launch an online grocery delivery service in Japan in the third quarter of this year. Walmart seems to have learned from past experience that partnering with local businesses is a better strategy than going it alone, and acquiring a stake in Flipkart, the next iteration of that strategy, seems like it should also yield favorable results.

An international money pit

Amazon, meanwhile, is finally seeing profits from its domestic e-commerce business thanks to the increased density of its fulfillment centers (shortening delivery times), third-party sellers, and a growing advertising business. However, it continues to lose money abroad as it reported an international loss of more than $3 billion last year.

In its more mature markets like the United Kingdom, Germany, and Japan, which make up the majority of its international sales, the company may already be profitable. However, it clearly sees developing markets like India as a major prize. That's why, in addition to investing $5 billion in India, Amazon is practically giving away its Prime service, listing it initially at just $7.78 per year, though it has since doubled that price. That rock-bottom pricing shows how much Amazon is willing to sacrifice to gain share in the Indian market and has also given it an early lead over Netflix as Amazon Prime had 610,000 subscribers compared to 520,000 for Netflix as of the end of last year.

If Amazon is able to acquire Flipkart, which is still unprofitable, it will likely become unstoppable in India as the deal would combine the top two e-commerce companies, along with Amazon's video service. However, the Kindle-maker's road to profitability in India likely becomes much longer if Walmart wins control of Flipkart. Walmart has the deep pockets to invest in the service and can connect it with its supply chain and brick-and-mortar business in India which consists of a modest 20 wholesale stores today, but the retailer plans to add another 50 stores by 2021. 

With the Indian middle class exploding, Flipkart would be a vital acquisition for either retailer. If Walmart wins, it will be the newest sign that the company is fully prepared to match Amazon's ambitions.