A country of milk lovers, abundant supply and a growing market—that’s what India offered Danone but the French giant chose to shut its dairy operations.

The company failed to gain scale even seven years after it launched its flavoured yoghurt, milk and curd in Asia’s third-largest economy. It couldn’t build a supply chain and a distribution network to take on entrenched rivals like Amul, Mother Dairy and Nestle India Ltd.

India’s white revolution that began in the 1970s transformed the nation into world’s largest milk producer, most of which is consumed locally. It produced 157 million tonnes in the year ended March 2016, much ahead of the second-placed U.S. Yet, India’s per capita milk consumption at 97 litres a year, according to an Edelweiss Securities quoting data from IMARC Group, is about a third of the U.S., and below the global average.

Growing consumption, Edelweiss Securities said, is expected to take India’s dairy industry from Rs 5.4 lakh crore by value in 2016 to Rs 9.4 lakh crore by 2020. Danone India chose to exit despite the scale of the opportunity.

Last week, the French giant said in a statement that it will discontinue milk and dairy products that made a “minority contribution to the overall business in India”. It’s also shutting its factory at Rai near Delhi. The company will focus on its nutrition and baby food with brands like Protinex, Farex, Nusobee, Dexolac. A segment that contributed 80 percent to its revenue, PTI reported in January last year quoting Danone India Managing Director Rodrigo Lima. Globally, dairy contributes half its sales followed by nutrition and baby food at 30 percent.

Danone relied on third-party suppliers to for milk, which doesn’t work for dairy companies, two senior executives from rival dairy product makers told BloombergQuint requesting anonymity.

Companies that have the infrastructure to procure directly from farmers enjoy a huge competitive edge as it assures a steady supply of quality milk, Edelweiss Securities said. Amul, the leader with 25-30 percent share in the organised milk market, has its own network of cooperatives that supply milk. Most other dairy companies source it directly from farmers.

The company also directly sold to retailers instead of roping in distributors, the people quoted above said. That’s expensive if a company doesn’t gain substantial volumes, said the first executive quoted above. Distributors add points of sales and provide a larger reach.

The other issue that hurt Danone India seven years on is the freebies for retailers along with competitive margins, said the second person quoted above. Besides the 10-12 percent margin like its peers, Danone India offered free packs, the two said.

And the French dairy giant priced its products higher than most peers, targeting the premium end of the market. Its 150-gram curd pack costs Rs 25. That’s higher than Amul’s Rs 22, and Nestle India Ltd.’s and Mother Dairy’s Rs 25 for 200 grams.

And then there is the management of the business itself. “Danone India is managed by a global team instead of a local one,” said Sunil Alagh, chairman of SKA Advisors. “It’s easier for a local team to control the situation on the ground.”