SAN JOSE, Calif. — As vaccination coverage declines in states that let people opt out of immunizations for personal beliefs, researchers from Stanford University warn there could be serious consequences ahead.

In a new study, scholars at Stanford’s School of Medicine and the Baylor College of Medicine find that slight declines in childhood measles vaccinations would cause disproportionately big increases in measles cases and public health costs. According to the study, published this week in JAMA Pediatrics, if just 5 percent fewer children in the 2-11 age range were inoculated against the measles, mumps and rubella (the MMR vaccine), the number of annual measles cases among that group would triple. That would raise public health costs by at least $2.1 million a year, according to the study.

“I think our study is a wake-up call for what we can expect in the coming months and years as vaccine coverage rates continue to decline in the 18 states that now allow nonmedical or philosophical belief exemptions,” senior author Peter Hotez, dean of the National School of Tropical Medicine at Baylor, said in a statement.

Measles spreads through sneezing and coughing, and people who are infected can go as many as four days without showing symptoms. The airborne virus stays in the air and can be infectious for as long as two hours.

While every state requires children to have an MMR vaccine before enrolling in school unless there is a medical reason for an exemption, 48 states also allow religious exemptions and 18 permit exemptions for personal beliefs. California used to have both exemptions, but eliminated them in 2015 after a measles outbreak started at Disneyland and spread to more than two dozen states.

Scientists say there needs to be 90 percent to 95 percent vaccine coverage to prevent a measles outbreak, but there are several parts of the country close to slipping below that threshold. If vaccine rates decline more, the study warns, measles cases could increase. Earlier this year, a measles outbreak occurred among a Somali immigrant community in Minnesota that had been targeted by anti-vaccine groups, and in 2014, 383 measles cases occurred across unvaccinated Amish communities in Ohio.

“Every year, an increasing number of states are debating non-medical exemptions, which are a critical driver of vaccination coverage,” Nathan Lo, a Stanford student and the lead author of the study, said in a statement. “This study quantifies the consequences of a rise in measles cases and state dollars that will be spent if personal belief exemptions that can reduce vaccine coverage are in place.”