Global consumer brands have long been infatuated with Chinese consumers. Now it is India’s shoppers they are after.

It has been a blockbuster year for Indian deals: More foreign money is now pouring into the south Asian nation than into China. Overseas companies have spent $38 billion acquiring Indian assets so far this year, compared with $32 billion in China according to Dealogic data. That overturns a long-term trend—the value of inbound mergers and acquisitions in China had outstripped that in India since at least 2000.

Almost half of the activity has been in India’s consumer and retail sectors. This week Unilever beat Nestlé in a competitive auction for Horlicks, a nutritional malted-milk drink that makes most of its sales in the south Asian country. In May, Walmart stumped up $16 billion for a controlling stake in Indian e-commerce site Flipkart.

IMF economists expect growth in India to exceed 7% over the coming years—a faster clip than China, which is slowing. Add the threat to Chinese consumer spending posed by trade tensions with the U.S. and it’s easy to see why companies are now betting on India.

Urbanization and changing family structures are driving strong demand for all kinds of products. City dwellers outspend people living in rural areas, while nuclear families spend 20-30% more per capita than India’s traditional extended families, according to The Boston Consulting Group.