In one its biggest foreign investments ever as it battles rival Amazon, Walmart has agreed to buy 77% stake in e-commerce giant Flipkart for $16 billion. Flipkart is based in India which is one of the world’s biggest emerging markets. Walmart said the remainder of the business will be held by existing investors including Flipkart’s co-founder Binny Bansal. In the long run, it aims to help in Flipkart’s transition into a publicly-listed subsidiary. The deal struck on Wednesday values Flipkart around $20.8 billion. In a statement, Walmart said India is one of the most attractive retail markets in the world, given its size and growth rate. In a joint statement, Walmart and Flipkart said they were in talks with other investors to join in the round as well, which could bring down Walmart’s stake after the transaction is complete. While they did not name potential investors, Alphabet, parent company of Google, is said to be among the investors that is looking to support the Indian online retail giant.