Alphabet is in talks to invest in Indian ecommerce company Flipkart alongside Walmart, sources familiar with the deal tell CNBC.

Insiders say that the deal could make sense as Alphabet hopes to fend off Amazon and promote the use of its enterprise services.

Amazon CEO Jeff Bezos and Alphabet CEO Larry Page.

Getty Images

Google's parent company Alphabet is in talks to invest in Indian e-commerce company Flipkart alongside Walmart, according to two people familiar with the deal.

Walmart announced on Tuesday it would take a 77 percent stake in the company for $16 billion. Of that $16 billion, $2 billion was "new equity funding" intended to spur growth. Walmart said that it was also in discussions with "additional potential investors" to join the round, though it would retain majority ownership. It did not mention any possible investors by name.

The conversations with Alphabet are ongoing and no deal has been reached, but one person familiar with the talks says that the $3 billion Alphabet stake floated by Indian press is "aggressive," suggesting that any investment would be less. This person also said that it wasn't clear whether the investment would be through Alphabet's growth investment arm, Capital G, or its corporate fund.

Although no deal has been signed, several people close to the company have thoughts on why a deal would make sense.

"Rumors of Google investing in Flipkart have swirled around for a bit, but I suspect the timing and vehicles of investment never lined up as well as it does with this Walmart deal," says Punit Soni, Flipkart's former chief product officer, who also worked at Google for eight years. He currently runs a health-tech startup called Suki.

Soni, who has no direct knowledge of a deal, speculates that Alphabet's would be less directly related to e-commerce, and more tied to the size of the market and keeping ahead of Amazon, which was also reportedly interested buying Flipkart.

"There is a strong benefit in people buying a lot of Android phones and e-commerce in India is a huge conduit for that," Soni said. "So there's a little bit of a 'next billion users' strategy and a bit of making Amazon sweat."

In the United States, Google and Walmart have already teamed up against Amazon through the search giant's Express shopping service, which allows users to have Walmart products delivered through Google.

Alphabet may also be interested in Flipkart as a way to get a leg up against cloud rivals Amazon and Microsoft.

An executive at Flipkart, who asked not to be named as they were not authorized to comment on these issues, speculated that investing alongside Walmart would keep Alphabet involved in Indian e-commerce while also giving it inroads to promote the use of its enterprise technology.