Exchange-traded fund investors are betting that health-care companies are poised for gains as they work to combat the coronavirus pandemic.

ETFs tracking the health-care sector have taken in more than $5.4 billion in April, putting them on pace for their best month of inflows since at least 2013, according to data compiled by Bloomberg.

For instance, State Street’s $24 billion Health Care Select Sector SPDR Fund, ticker XLV, has taken in almost $3 billion, the most in a single month in the fund’s 20-year history. BlackRock’s iShares U.S. Medical Devices ETF, or IHI, has recorded inflows of about $1.3 billion.

As the coronavirus continues to wreak havoc on countries across the world, health-care companies are focused on creating treatments or vaccines that would allow economies to restart. Investors are piling into stocks that stand to benefit, with a survey released earlier this week finding that biotech investors are the most optimistic since early 2019.

“It may be just trying to buy something that’s defensive or chasing the hot dot,” said Mike Bailey, director of research at FBB Capital Partners. “There’s some validity there if you think health care is going to solve not only a health crisis but also an economic crisis.”

Another bullish factor is that the pandemic has put political efforts tied to drug pricing on the back burner as Washington gets more friendly with the industry, wrote Jefferies health-care trading-desk analyst Jared Holz in a note released Sunday evening.

IHI climbed 1.8% Thursday to $259.09 as of 10:46 a.m. in New York, near a two-month high. XLV added 2% to $100.34.

However, JPMorgan analysts have warned that the health-care system may face lower demand due to fewer elective procedures, which are more profitable. For instance, shares of Medtronic, which makes up almost 12% of IHI, dropped almost 4% on Tuesday after the company announced a 60% revenue decline over the past few weeks.

As of April 22, 29 states were ready to reopen elective procedures and 7 more may meet guidelines to make that possible in the next 14 days, according to Wells Fargo analysts.

This article was provided by Bloomberg News.