[What you need to know to start the day: Get New York Today in your inbox.]

ALBANY — Lawmakers in New York, the epicenter of the nation’s measles outbreak, voted on Thursday to end religious exemptions for immunizations, overcoming opposition by vaccine skeptics and others who said the measure infringed on religious and constitutional rights.

Calling it a public health emergency, Gov. Andrew M. Cuomo immediately signed the bill, adding New York to a small handful of states that do not allow exemptions on religious grounds, including California, Arizona, West Virginia, Mississippi and Maine.

The issue is particularly acute in New York, where many measles cases have originated in Orthodox Jewish communities in Brooklyn and in Rockland County, where so-called vaccine symposiums have featured speakers who encouraged people to shun immunization.

The tension over the issue was readily apparent in the Capitol on Thursday as hundreds of angry opponents — many with young children and infants — pleaded with lawmakers to reject the bill, sometimes invoking the will of God, other times their rights as parents. The show of raw emotion affected even supporters of the bill.