As of late August, there had been more than 1,200 cases of measles across 31 U.S. states this year. It's a dispiriting comeback for a disease that was declared eliminated in this country in 2000. If the disease has not stopped spreading by the time you read this, the U.S. will likely have lost this status. The illness has been cropping up mainly in pockets of unvaccinated people. Those who choose not to immunize their families are placing at risk not only themselves and their children but also others who cannot be vaccinated because they are too young or have medical issues.

There isn't an iota of doubt that vaccines are an overwhelmingly safe and effective way to prevent measles and other diseases, including mumps, rubella, poliomyelitis and pertussis. All 50 states mandate that children entering school get immunized unless they have a medical exemption. Yet almost every state also offers religious exemptions, and more than a dozen offer personal belief/philosophical ones as well. California, Mississippi, West Virginia, Maine and, most recently, New York State have gotten rid of all nonmedical waivers. The others must follow suit. It's imperative for protecting public health.

It doesn't take many unvaccinated people to cause an outbreak. Measles was one of the first vaccine-preventable diseases to reappear because it is so contagious; the threshold for resistance to a disease conferred by sufficient community-wide levels of immunity or vaccination—so-called herd immunity—is 93 to 95 percent. If vaccination levels fall below that threshold, an infected person can cause an outbreak.

Hesitancy about vaccines is nothing new. People have questioned inoculations since Edward Jenner discovered the smallpox vaccine in 1796. Today vaccines are partly a victim of their own resounding success. People rarely, if ever, see once common diseases such as measles and polio, so they don't understand their potential danger. On top of that, relentless misinformation campaigns have touted such false claims as the idea that vaccines cause autism. Numerous studies have shown they do not. The discredited researcher Andrew Wakefield introduced this idea in a now refuted study, and celebrities such as Jenny McCarthy and Robert F. Kennedy, Jr., have given it credence. And social media has made it easier than ever for vaccine deniers to find like-minded networks of people to confirm their false beliefs.

Despite the existence of religious exemptions to vaccines, most major faith groups in the U.S. do not prohibit vaccination, and many religious leaders encourage it. Nevertheless, a large number of this year's measles cases occurred in ultra-Orthodox Jewish communities in the neighborhood of Williamsburg in Brooklyn and in Rockland County, New York. (It's not just the Jewish community: the majority of New York City schools with relatively low rates of measles vaccination among students were Muslim or Christian academies or alternative-learning institutions.) The outbreak in New York City was declared over in September, but cases have persisted in Rockland County.

Many people who choose not to vaccinate believe no government should force them to put medicine into their bodies or their children's. They frame the choice as a personal right, but they are not taking into account the rights of others, including their own children, to be free of disease. When it comes to balancing the two, we need to consider the needs of the community as well as those of the individual. The Supreme Court ruled in Jacobson v. Massachusetts that states have the authority to require vaccination against smallpox, and in Prince v. Massachusetts it reaffirmed that the right to religious liberty does not include the right to expose a child or the community to disease.

Some experts argue we should just make it more difficult to obtain religious and philosophical exemptions. But unless the exemptions are removed completely, there will always be people who want to use them. Partial elimination, as the Washington State Senate enacted in the case of philosophical exemptions for the MMR (measles, mumps and rubella) vaccine alone, is also shortsighted because it sends the message that some immunizations are less important than others. The only surefire solution is to eliminate nonmedical exemptions to recommended vaccines.

People who cannot be vaccinated for medical reasons—such as those with compromised immune systems—should of course remain exempt. But there is no legitimate argument against vaccination for the vast majority of healthy people, and there are many powerful arguments in favor of it. Refusing to vaccinate is not a matter of freedom. It's a matter of public safety.