Measles and whooping cough, two infectious diseases US public health officials had gotten pretty good at preventing, have made a disturbing comeback in recent years.

Why? Many believe the recent outbreaks were closely tied to people who refuse vaccinations for all kinds of reasons.

And a new paper in JAMA confirms they're right.

The study, led by researchers at Emory University in Atlanta, reviewed 18 studies that traced the immunization histories of the 1,416 people (ages 2 weeks to 84 years) who were diagnosed with measles in the United States since 2000. Of those, 970 patients had detailed vaccine histories.

When the researchers looked closely at those histories, they found that 574 people were unvaccinated despite being vaccine eligible, and 405 cases had religious or philosophical reasons for refusing vaccines. In other words, about 29 percent of the total cases (or 42 percent of those for whom researchers had vaccine histories) had no medical reason to abstain from getting their shots.

Children with vaccine exemptions are at much greater risk of being infected with measles than fully vaccinated children. In one study the researchers looked at, the risk was 35 times that of the vaccinated population. Of the total measles cases, 178 were younger than 12 months — babies too young to get shots.

The cumulative epidemic curve of all the measles outbreaks since 2000 (when the disease was declared "eliminated" in the US) revealed that unvaccinated individuals were often "patient zeroes," meaning they sparked outbreaks by creating pockets of disease susceptibility that caused others to fall ill. Over that period, the US went from having no local spread of measles to 189 cases in 2015.

This is precisely why having more unvaccinated people threatens what's called "herd immunity." In order for any vaccine to be effective, you need to have a certain (high) percentage of people in a population immunized. Herd immunity keeps diseases from spreading through populations very easily, and keeps vulnerable groups who can't be vaccinated (such as very young babies or people with allergies to vaccines) protected.

In addition to their analysis of measles cases, researchers also looked at 32 reports on pertussis (whooping cough) outbreaks since 1977. Here, they found that a big part of what caused disease clusters to spring up was the waning efficacy of the vaccine. But vaccine refusers also helped spread whooping cough further. "The most preventable reason for outbreaks is vaccine refusal," said study author Saad Omer, an epidemiologist at the Emory Vaccine Center in Atlanta who's been studying vaccine issues for more than a decade.

How policy can make it harder for parents to opt out of vaccines for their kids

Following a massive measles outbreak in Disneyland, the state of California enacted a law last year that made it a lot harder for people to opt out of vaccines. Public health officials saw the vaccine mandate as a win. Some parents viewed the law as draconian, putting decisions about their children's health into the hands of government.

Since the newest study adds to the pile of evidence that suggests people who refuse vaccines help cause outbreaks, Omer said, California's new vaccine law is a smart move. "There is some value in changing the balance" so that it's at least as time-consuming to choose not to have your children vaccinated as it is to have them vaccinated. He proposes that people who chose to opt out of shots for nonmedical reasons should have to go to their doctor for counseling on that decision and its implications.

In Omer's earlier research, he's found that rates of whooping cough are higher in places that have laxer exemption policies, like Arkansas and Texas. He's also found that parents will use medical exemptions more commonly in states that make them easily accessible or that bar philosophical vaccine exemptions.

Only three states — California, Mississippi, and West Virginia — have a policy of no exemptions in place. All the others allow people to opt out for some mix of personal, philosophical, or religious reasons. But every state — even California, Mississippi, and West Virginia — allows medical exemptions.

Overall, the number of people who refuse vaccines in the US is actually small, usually only about 1 or 2 percent of the total population. But with diseases like measles making a comeback, there are concerns that the number of refusers is growing. New studies like this one demonstrate why that puts everyone at risk.