Opponents describe tighter laws as an assault on their parental rights and religious freedom. In Washington State, opposition was so fierce that legislators managed only to eliminate exemptions based on personal beliefs, not those based on religion — and only for the measles, mumps and rubella vaccine.

Parents may continue to use religious exemptions to avoid the M.M.R. vaccine, and can cite other personal or moral beliefs to avoid other childhood vaccines.

“We would have preferred removing the personal exemption for all vaccines, but we weren’t able to — there was so much political pushback,” said state Rep. Monica Stonier, a Democrat who also represents Vancouver. “We just wanted to get something done.”

Opposition to vaccines has been around for almost as long as vaccines themselves. Massachusetts became the first state of many to make smallpox vaccination compulsory in the early 1800s, and in 1827 Boston became the first city to require the vaccine for school children. Nearly half of all states had vaccine requirements by the early 20th century. But they were not uniformly enforced, and some were repealed after protests.

[Like the Science Times page on Facebook. | Sign up for the Science Times newsletter.]

Officials in Cambridge, Mass., sought to enforce the law during a 1902 outbreak of smallpox, and filed charges against Henning Jacobson, a resident who refused to be vaccinated because, he said, an earlier smallpox vaccination had made him and his son ill. The case went to the Supreme Court, which ruled in 1905 that states had the authority to make vaccinations mandatory.

Today all 50 states require certain vaccinations for students attending school, with exceptions made for children who cannot tolerate them because of underlying medical conditions, according to the National Conference of State Legislatures, a bipartisan organization that tracks vaccine legislation in the 50 states.

Most states also grant exemptions for people who oppose vaccination for religious reasons, and until recently 16 states allowed exemptions based on personal, moral, philosophical or other beliefs as well, according to the N.C.S.L.