Walmart recently spent billions to get into online retail in India. Now Amazon is going offline in the hope of gaining millions of new customers in the vast market.

The e-commerce giant is buying 49% of More, a popular Indian supermarket chain, according to multiple reports in local media. The remaining 51% will be owned by Indian private equity firm Samara Capital.

More has over 540 supermarkets and hypermarkets across India. It is part of a bigger retail business that was recently sold by Indian conglomerate Aditya Birla Group to a company called Witzig.

An Amazon spokesperson told CNN that Amazon and Samara have "agreed to co-invest" in Witzig but declined to comment on the size of Amazon's investment or its stake.

Witzig director Paurush Roy confirmed Samara Capital's 51% stake and its acquisition of More, but did not comment on Amazon's involvement.

"We are confident that through More, we will be able to address customer needs for choicest of grocery and food items across the country," Roy said.

Amazon took a small stake in an Indian fashion retailer — Shoppers Stop — last year, but the More investment is its first big foray into brick-and-mortar retail in the country.

It's a move that will intensify its battle with Walmart for the country's hundreds of millions of shoppers.

Walmart took control of Flipkart — India's biggest e-commerce company and Amazon's chief rival in the country — in May, spending $16 billion on a 77% stake.

The Arkansas-based retailer had been trying to expand its footprint in India for years, but could only open a handful of wholesale distribution outlets because of laws restricting foreign investment in retail.

Walmart's purchase of Flipkart gives it direct access to an Indian e-commerce market that Morgan Stanley has estimated will be worth $200 billion by 2026.

But most Indians, like many Americans, still prefer to buy groceries in person. Amazon's purchase of US grocery giant Whole Foods last year was driven by a desire to bring offline shoppers into its online ecosystem. It will be hoping More customers do that as well.