Unvaccinated people are more than twice as likely to be reinfected with Covid-19 than people who are fully vaccinated, a new study suggests, underscoring the importance of vaccines in containing the pandemic.

The study, published Friday by the Centers for Disease Control and Prevention, looked at nearly 250 patients in Kentucky who had Covid-19 in 2020 and tested positive again between May and June 2021. The authors compared the vaccination status of those patients with those of nearly 500 similar people who also had an infection in 2020 but hadn’t been reinfected through June 2021.

People who were unvaccinated were 2.34 times more likely to be reinfected than those who were fully vaccinated, the researchers found.

“If you decide you’re just going to trust that natural immunity is going to protect you, you’re more than twice as likely to get infected as those people who decide to get vaccinated,” said Daniel Griffin, chief of infectious disease at healthcare provider network ProHealth New York, who wasn’t involved in the study.

Researchers said they were unable to confirm reinfection through whole genome sequencing, the gold standard. In some cases, a repeat positive test can be due to prolonged shedding of the virus, or the body’s inability to shed the initial infection. But the authors also noted that the long period between the first and second positive tests made reinfection the most likely explanation.

Although both prior infection and vaccination provide protection from the coronavirus, some lab studies have shown that previously infected people may have a weaker immune response against some Covid-19 variants. One study found that blood serum collected from infected people before they were vaccinated showed a weaker response to the Beta or B. 1.351 variant, first detected in South Africa, when compared with the original strain. However, after vaccination, their immune responses to the variant were boosted.

“If you have had Covid-19 before, please still get vaccinated,” CDC Director Rochelle Walensky said in a statement. “Getting the vaccine is the best way to protect yourself and others around you, especially as the more contagious Delta variant spreads around the country.”

As the Delta variant sweeps the globe, scientists are learning more about why new versions of the coronavirus spread faster, and what this could mean for vaccine efforts. The spike protein, which gives the virus its unmistakable shape, may hold the key. Illustration: Nick Collingwood/WSJ The Wall Street Journal Interactive Edition

Write to Sarah Toy at sarah.toy@wsj.com