US health officials on Friday gave more reasons for people to go get themselves vaccinated against COVID-19 by offering more evidence that vaccinations give better protection against the virus than immunity from a prior infection.

According to a new CDC study, unvaccinated people who had been infected months earlier were five times more likely to get COVID-19 than fully vaccinated people who didn’t have a prior infection.

The study was conducted by looking at data from nearly 190 hospitals in nine states. The researchers counted about 7,000 adult patients who were hospitalized this year with respiratory illnesses or symptoms similar to those of COVID-19.

About 6,000 of them had been fully vaccinated with the Moderna or Pfizer vaccines three to six months before they wound up in a hospital. The other 1,000 were unvaccinated but had been infected with COVID-19 three to six months earlier.

About 5% of the vaccinated patients tested positive for the coronavirus. The unvaccinated group had this figure at 9%. The researchers factored in other data points, including age and how much virus was circulating in different areas, to calculate that the unvaccinated group was at even higher risk.

There was not enough data to reach any conclusion on the Johnson & Johnson vaccine, the authors of the study said.

The study echoes some earlier research, including studies that found higher levels of infection-fighting antibodies in vaccinated patients.

Experts say that it is important information for parents at a time that the government is gearing up to expand its vaccination campaign to more children.

“There have been many people who have advocated, ‘Well, let’s just let the kids get infected.’ I think these data support the notion that the vaccines work better in general, and likely work better for 5- to 11-year-olds,” Dr Mike Saag, an infectious disease expert at the University of Alabama at Birmingham, told the Associated Press.

(With AP inputs)