In December 2014 something unusual happened at Disneyland. People came to visit Mickey Mouse, and some of them left with measles. At least 159 people contracted the disease during an outbreak lasting several months. This is more than the typical number in a whole year in the United States.

The leading theory is that measles was introduced in Disneyland by a foreign tourist. That could happen anywhere. Medical experts generally agree that the fact that it took off was probably a result of California’s low vaccination rates, which in turn was a result of an inability to persuade a significant share of Californians that vaccines were important.

The episode made national news, but in the next few years, another development was striking but attracted less national attention: Because of a policy change, California was able to turn it around. Data from a county-by county analysis shows that in many schools with the lowest vaccination rates, there was an increase of 20 to 30 percentage points in the share of kindergartners vaccinated between 2014 and 2016. One law changed the behavior of impassioned resisters more effectively than a thousand public service announcements might have.

Limiting outbreaks of vaccine-preventable diseases relies on “herd immunity.” Essentially, if enough people are vaccinated, a disease cannot get a foothold. For measles, this number is around 90 percent to 95 percent. In other words, if 95 percent of people in an area are vaccinated for measles, an outbreak is unlikely even if the disease is introduced.