Walmart is taking another run at breaking into the Indian market -- this time by writing a fat check.

The retail giant is reportedly in talks to invest up to $1 billion in Flipkart, the top e-commerce firm in a market that Walmart has repeatedly failed to crack.

Both companies declined to comment on negotiations.

But the rationale for a deal is compelling: Walmart (WMT) would gain access to 1.3 billion consumers in a market where it currently has very limited operations. Flipkart would get the cash it needs to fend off a pack of hungry rivals.

"Walmart will have to learn how Indians shop here, because it is very different from the way it happens in the developed markets," said Krishnarajan Nedungadi of Indian retail consultancy Ramms. "Flipkart knows how it happens here."

Related: Walmart is making a comeback

A new local partner may be just what Walmart needs.

The Arkansas-based retailer lobbied for years for permission to open its own brick and mortar stores in India, but the country's restrictive rules on foreign investment made that impossible. Another attempt to gain a foothold -- a joint venture with Bharti Enterprises -- also failed to gain traction before it was abandoned in 2013.

Walmart has since been relegated to operating 21 wholesale distribution outlets in the country. It is not allowed to sell products directly to consumers.

Related: India isn't just growing fast, it's much more competitive

But e-commerce presents a new opportunity. And Flipkart, which was valued at $15 billion in its most recent round of funding, is the leading force in a market that also features key Walmart rival Amazon (AMZN).

Amazon has made significant investments in India, with founder Jeff Bezos recently funneling $3 billion into his company's operations in the country. It's a cash infusion that builds on the $2 billion he committed in 2014.

Flipkart's local knowledge may give it the edge, however, in a market that Deloitte predicts will be worth $100 billion a year by 2020.

"Companies coming into India have to create trust," says Kumar Rajagopalan, CEO of the Retailers Association of India, who said the country's complex FDI regulations and myriad tax laws are sometimes "worrisome" for large foreign firms.

But Nedungadi said that in the short-term, the entire industry may benefit from Walmart's delivery and logistics expertise.

"The industry will benefit, because a lot of back-end delivery issues will get sorted out," Nedungadi said. "With large players trying to attract a lot of new customers into the fold, Amazon will also benefit."