Should children risk getting a deadly disease by going to school? There was a time when infected children frequently spread serious diseases like smallpox, pertussis, diphtheria, and polio (not to mention several others) to classmates. Thankfully, that risk is drastically lower today largely due to vaccination.

Over the years, vaccines have caused the threat of many deadly diseases to vanish. They have saved an estimated 450,000 lives to date in the United States and an additional two million to three million globally each year.

Earlier this month, New York state took an important step to increase those numbers by repealing a religious exception to its vaccine mandate for schoolchildren. While vaccine skeptics protested stridently, the action will help to protect everyone.

Vaccines have been around for more than 200 years. The first, which conferred immunity to smallpox, was developed in 1796, and its use was strongly encouraged by Thomas Jefferson. More recently, vaccines were developed against pertussis in 1914, diphtheria in 1926, and measles in 1963. In 1955, the scourge of polio, which killed or paralyzed as many as 15,000 children a year, succumbed to a vaccine, a development hailed at the time as a medical miracle.

But vaccines are only effective if people get them, and mandates have proven an extremely effective way to make sure they do. Massachusetts enacted the first mandate for schoolchildren in 1855 for the smallpox vaccine. By the 1920s, it was widely required for school attendance throughout the country.

The antivaccine movement has been around for as long as vaccines. It rose to prominence in the 1830s and has persisted ever since, often fed by rumors and gossip. It received a boost in 1998 with publication of a since-discredited article speculating about a link between vaccination and autism. Fears of such a link persist, even though numerous scientific studies have found that none exists.

Nevertheless, the constitutional authority of states to impose vaccine mandates rests on solid ground. In 1905, the Supreme Court affirmed that authority when it upheld a Massachusetts mandate that all adults receive the smallpox vaccine during a major epidemic. The only required exception is for those who can demonstrate a probability of harm from a vaccine, a group that is usually extremely small. In 1922, the court extended its ruling to mandates for schoolchildren, and in 1944, it ruled that religious objections need not take precedence.

All but four states chose to permit exemptions to vaccine mandates on religious grounds, even though they are not constitutionally required to do so. But this month, New York became the fifth state. It was spurred by a measles outbreak that began among unvaccinated members of a religious community in the state that then spread nationwide.

Respect for religious belief is a core American value embedded in the Constitution, but so is protecting the population’s welfare. Unvaccinated schoolchildren are not only a threat to themselves. They jeopardize the health of classmates who cannot be vaccinated because of medical risks and classmates for whom a vaccine does not produce sufficient immunity. As the Supreme Court has made clear, freedom of religion does not include the right to jeopardize the health and safety of others.

Unvaccinated children also threaten the rest of us. When enough people in a community are vaccinated, the disease disappears entirely through a phenomenon known as herd immunity. Since 2000, there have been enough vaccinated people in the United States for measles to disappear as an endemic disease. Growing numbers of people avoiding the vaccine are changing that. As a result, measles has inflicted needless suffering on more than a thousand people this year.

In strengthening its mandate for schoolchildren, New York state is on a path to saving lives.

Robert I. Field, JD, MPH, PhD, is professor of law and public health at Drexel University. He is a member of The Inquirer’s Health Advisory Panel and founder of The Inquirer’s “Health Cents” blog.