Amid a rampant measles outbreak, New York enacted a law on June 13 ending religious exemptions for vaccinations.

The State Assembly passed the bill 77-53, while the State Senate tally was 36-26. Gov. Andrew Cuomo immediately signed it.

The only other states that don’t allow such exemptions are Arizona, California, Maine, Mississippi and West Virginia.

The current measles outbreak in the United States is the worst in more than 25 years, according to the U.S. Centers for Disease Control and Prevention, as the City of New York has shuttered 10 Orthodox Jewish school in the city, nine of them in Brooklyn with the other one in Queens, due to failure to vaccinate students.

Since September 2018, 588 confirmed cases have been reported in New York City, which has ordered the vaccination of all Williamsburg and Borough Park residents under the age of 19.

Assemblyman Michael Montesano, a Long Island Republican, framed the bill as “an attack on people’s First Amendment rights,” saying, “It’s still the individual parent, who is raising this child, that has the fundamental right to decide what happens with their child in all facets of their life.”

However, Assemblyman Kenneth Zebrowski, a Rockland County Democrat, said prior to voting in favor of the legislation, “Our job is not just to react to epidemics. Our job as legislators is to prevent epidemics.”