At a time when the Covid-19 pandemic was wreaking havoc in India, foreign investors were pumping money into the country at a pace faster than before.

Between April and September, when India’s economy was in a “technical recession,” the foreign direct investment into the country rose 15% year-on-year to $39.9 billion (Rs 29,400 crore), according to a December 4 report by CARE Ratings.

“Optimism on India growth story among foreign investors combined with ample liquidity in the global market has aided flows into India,” the report said. It added that the Indian government’s reforms like supporting the manufacturing sector and investors’ bid to find alternate supply chains to China have also led to an increase in FDI into India.

After all, this was the period during which the world was eyeing China with heightened scepticism with several global leaders blaming the country for the outburst of coronavirus, and India announced a series of sops to cash in on any opportunities to portray itself as the alternative to its neighbour.

Nearly 60% of this FDI came into India’s computer software and hardware sectors. “The sector has benefitted during the pandemic times on account of work from home policies and greater engagement in digital channels,” the report observed.

What is surprising is that foreign investors have continued to pour money into India despite concerns over the economy’s ability to stage a quick recovery. Economists have warned that it will take years to offset the impact of damage caused by the pandemic-triggered lockdowns.

High-frequency indicators such as imports and auto sales also reveal that the demand has remained weak despite the partial opening up of the economy. And with the lockdowns being put in place again to halt the spread of Covid-19, the consumption could further weaken.

This article first appeared on Quartz.