Walmart tops Fortune Global 500 list
Customers shop at a Walmart store on January 17, 2017 in Skokie, Illinois. Wal-Mart Stores Inc., America's largest employer.Scott Olson/Getty Images

Walmart Inc has agreed to pay $16 billion for a roughly 77 percent stake in Indian online shopping site Flipkart, the U.S. retailer's biggest foreign investment ever as it battles rival Amazon.com Inc in one of the world's biggest emerging markets.

The remainder of the business will be held by some of Flipkart's existing shareholders, including Flipkart co-founder Binny Bansal, China's Tencent Holdings Ltd, Tiger Global Management LLC and Microsoft Corp, the company said in a statement on Wednesday.

The investment was more than the $10-12 billion given by sources close to the deal in the past week.

Walmart said it expected the deal to knock about 25-30 cents off its earnings in fiscal 2019, assuming the deal closes at the end of the second quarter.

It also said that the deal included $2 billion of funding from new equity in Flipkart, which could be sold to additional investors in the future, diluting the U.S. company's overall stake.