By the 1800s, Americans were decades into what had seemed like a losing war against smallpox. But the tides had finally begun to turn: Throughout the previous century, people had experimented with variolation, which involved getting exposed to a smallpox-infected substance (like pus) to build immunity. The method was even adopted by George Washington to inoculate his forces during the Revolutionary War. And when British physician Edward Jenner’s smallpox vaccine—which used cowpox-infected substances—started making its way around the U.S. in the early 19th century, things really seemed to be looking up.

But inventing a vaccine was only half the battle; the other half was ensuring that people actually got vaccinated. In 1809, Massachusetts became the first state to pass a law requiring that its general population receive the vaccine [PDF]. Boston, a city ravaged by smallpox in 1721, took it one step further in 1827 by mandating vaccination in schools—and Massachusetts embraced that mandate on a state-wide scale in 1855.

As CNET reports, the concept gradually caught on in other states, and almost half had enacted school immunization legislation by the turn of the 20th century. But some people took issue with the government commanding its constituents to submit to such a thing. In 1905, the U.S. Supreme Court tried to put the question of constitutionality to rest by ruling in Jacobson v. Massachusetts that the Cambridge Board of Health was well within its right to require smallpox vaccinations for city residents. Another Supreme Court ruling in 1922, Zucht v. King, established that vaccination mandates were constitutional in schools, specifically.

As vaccines for other diseases were introduced throughout the 20th century, school immunization requirements followed. Legislation—and enforcement of the legislation—varied state by state; and according to Healthline, there wasn’t much of an organized effort to encourage childhood immunizations until measles began to wreak havoc on kids in the late 1960s. When the federal government rolled out the Childhood Immunization Initiative in 1977—intended to bolster vaccination rates for measles, mumps, tetanus, rubella, and a few other common illnesses—every state rose to the occasion and passed some sort of school immunization mandate.

That’s essentially where things stand today. There’s still a lot of variation from state to state, and some do make exceptions for students with certain medical conditions or religious beliefs. But no matter which state you call home, there are laws on the books decreeing that kids get their shots before heading to school—and there have been for quite a while.

[h/t CNET]