In the past decade, studies have found that taking vitamin D can lower the odds of developing respiratory infections like the cold and the flu, especially among people who have documented deficiencies. Now scientists are trying to find out whether vitamin D might also help protect against COVID-19.

Some scientists believe that people with vitamin D deficiencies have weak or abnormal immune responses that make them more susceptible to developing COVID-19 and experiencing severe symptoms. The link has raised debates among experts and prompted researchers at Harvard and other universities to start randomized trials examining whether there is a link.

But so far, most of the evidence for the claim comes from observational studies that do not prove causation. And experts are urging people to be cautious about gobbling down high doses of supplements in the hopes of obtaining benefits that may not exist.

The speculation that vitamin D could protect against COVID-19 has been fueled in part by observations that deficiencies are particularly common among groups that have been hit disproportionately hard by the novel coronavirus, such as older adults, nursing home residents, and African Americans and other minorities. Obesity, another risk factor for severe COVID-19, is also associated with low vitamin D levels.

Vitamin D helps reduce inflammation and can stimulate the release of antimicrobial proteins that kill viruses and bacteria. One team of researchers at Northwestern University released a study, which has not yet been peer-reviewed, suggesting that vitamin D could help to quell cytokine storms, a type of immune reaction that appears to worsen outcomes for coronavirus patients.

In March, Dr. Tom Frieden, a former director of the Centers for Disease Control and Prevention, wrote an opinion piece suggesting that vitamin D deficiencies could worsen outcomes for COVID-19 patients. He urged people to avoid deficiencies by spending time in the sun, taking supplements or eating foods rich in vitamin D like fatty fish, egg yolks and fortified milk.

The Institute of Medicine recommends that most adults get 600 international units of vitamin D from food or supplements daily, or 800 IU if they are 71 and older. Many experts say that vitamin D is generally safe at doses up to 2,000 IU a day for those who aren’t deficient.

Since the pandemic began, sales of vitamin D and other supplements promoted for immune health have soared. But preliminary studies of vitamin D and COVID-19 have yielded mixed results.

At the University of Chicago Medicine, which serves a largely black and Hispanic population, researchers reviewed the medical records of more than 4,300 patients who were tested for COVID-19 in March and early April.

They found that people who were vitamin D deficient were 77% more likely to test positive for COVID-19 compared to people who had normal levels.

Dr. David Meltzer, a professor of medicine at the University of Chicago and the lead author of the study, which has not yet been peer-reviewed, cautioned that the findings did not prove causation.

He said he and his colleagues were recruiting local paramedics, police officers and other emergency workers for a randomized trial that will test whether taking low to moderate doses of vitamin D daily changes their risk of developing COVID-19 or the severity of their symptoms. Meltzer suspects that people taking vitamin D who contract the virus will have fewer symptoms “because the immune system will be less likely to have an exaggerated inflammatory response.”

“I think you can learn a lot from observational studies,” said Meltzer, who is chief of the Section of Hospital Medicine at the University of Chicago Medicine. “But in the end we desperately need randomized trials to determine as rapidly as we can if there’s a real effect here.”