Natural immunity, or exposure to a disease that helps the immune system fight future infections, is better than no immunity. But, with COVID-19, it’s not better than a vaccination.

A new study based on data from 187 hospitals in nine states found that mRNA vaccines from Pfizer-BioNTech and Moderna are about five times more effective than a previous infection at preventing hospitalization. Among those hospitalized between January and September with COVID-like symptoms, anyone with a previous infection who remained unvaccinated was 5.49 times more likely to test positive than someone fully vaccinated.

Those who benefited most from vaccination appeared to be Moderna recipient and participants more than 65 years old.

The study, released by the Centers for Disease Control and Prevention, reviewed data from adult patients who had tested positive three-to-six months before their hospitalization, which would reduce the likelihood that their illness was related to an ongoing infection, and patients fully vaccinated in that same time period. Patients who had received only a single dose of an mRNA vaccine, a second shot less than two weeks before hospitalization or had received the single-dose Johnson & Johnson vaccine were excluded.

The hospitals were in New York, Minnesota, Wisconsin, Utah, California, Oregon, Washington, Indiana and Colorado.

The CDC says that, overall, the hospitalization rate among unvaccinated people is 12 times higher than for those fully vaccinated.

Scientists say there isn’t enough information available to determine how long natural immunity lasts. A previous COVID-19 infection can protect unvaccinated people from reinfection anywhere from three months to five years, according to an earlier study in The Lancet Microbe.

Yet it appears a infection last year followed by an mRNA vaccination this year offers a type of super immunity. Several recent studies, including this summer at Rockefeller University in New York, point to different antibody responses in natural infection and vaccination. Combined, they neutralized each of the six variants tested, including Delta, and several others related to the virus that causes COVID-19, SARS-CoV-2. The antibody response was so strong that researchers speculated these people’s immune system also could have neutralized the first coronavirus (SARS-CoV-1) that emerged 20 years ago.

“We  have found the people who are most protected are those who actually had the virus and get the vaccine,” says Dr. Ulysses Wu, Hartford HealthCare’s System Director of Infection Disease and Chief Epidemiologist. “So they are, for the most part, super-immune whenever they get that second shot. We can almost say that the vaccine serves as the booster to their natural immunity. Those people have the greatest protection.”