Courtesy Shimon Singer Family
Now playing
01:56
New York man: I'm worried for my baby's safety
Pharmacy student Jason Rodriguez prepares Pfizer vaccines at the Christine E. Lynn Rehabilitation Center in Miami, Florida on April 15, 2021. - Jackson Health System launched a Covid-19 vaccination initiative with colleges and universities in Miami-Dade County, which include Barry University, Florida International University, Florida Memorial University, Miami Dade College and University of Miami. Through this partnership, students who are Florida residents, as well as out-of-state and international students, will be allowed to sign up for a COVID vaccine appointment via our online portal. (Photo by CHANDAN KHANNA / AFP) (Photo by CHANDAN KHANNA/AFP via Getty Images)
CHANDAN KHANNA/AFP via Getty Images
Pharmacy student Jason Rodriguez prepares Pfizer vaccines at the Christine E. Lynn Rehabilitation Center in Miami, Florida on April 15, 2021. - Jackson Health System launched a Covid-19 vaccination initiative with colleges and universities in Miami-Dade County, which include Barry University, Florida International University, Florida Memorial University, Miami Dade College and University of Miami. Through this partnership, students who are Florida residents, as well as out-of-state and international students, will be allowed to sign up for a COVID vaccine appointment via our online portal. (Photo by CHANDAN KHANNA / AFP) (Photo by CHANDAN KHANNA/AFP via Getty Images)
Now playing
01:55
Covid-19 vaccine demand may soon reach a tipping point
Sen. Lisa Murkowski (R-AK) speaks to reporters as she arrives for the continuation of the Senate impeachment trial of President Donald Trump at the U.S. Capitol on January 29, 2020 in Washington, DC. The next phase of the trial, in which senators will be allowed to ask written questions, will extend into tomorrow. (Photo by Mario Tama/Getty Images)
Mario Tama/Getty Images
Sen. Lisa Murkowski (R-AK) speaks to reporters as she arrives for the continuation of the Senate impeachment trial of President Donald Trump at the U.S. Capitol on January 29, 2020 in Washington, DC. The next phase of the trial, in which senators will be allowed to ask written questions, will extend into tomorrow. (Photo by Mario Tama/Getty Images)
Now playing
04:08
Murkowski explains why she's voting for Biden nominee
pool
Now playing
04:20
Watch as judge reads out verdict in Chauvin trial
News 12 Long Island
Now playing
02:45
1 dead and 2 wounded in shooting at Long Island Stop & Shop
CNN
Now playing
01:33
Gupta on Covid-19: It doesn't seem to transmit well on surfaces
Now playing
05:01
'Did I strike a nerve?': Val Demings takes on Jim Jordan
NBC/Today Show
Now playing
02:27
'To a certain extent, nativist': Bush criticizes current GOP
NASA/JPL
Now playing
01:29
Watch the Ingenuity helicopter's first flight on Mars
AirTag
Apple
AirTag
Now playing
01:17
See AirTag, Apple's new device for tracking your lost stuff
Scene video following a crash involving a Tesla Saturday night in Spring, TX
Scott Engle
Scene video following a crash involving a Tesla Saturday night in Spring, TX
Now playing
01:09
Fatal Tesla crash had no one in the driver's seat, police say
alexey navalny russia health vladimir putin Kiley pkg intl ldn vpx_00012003.png
alexey navalny russia health vladimir putin Kiley pkg intl ldn vpx_00012003.png
Now playing
03:06
Navalny ally warns he is in dire health. Here's how he got here
DOGE COIN
Getty Images
DOGE COIN
Now playing
03:24
Dogecoin's value has skyrocketed this year
Fox News/CNN
Now playing
04:07
'Mean girl group chat': Keilar reacts to Trump's interview with Sean Hannity
Reuters
Now playing
02:14
Military spokesman announces transitional president in Chad
WCCO
Now playing
01:27
Shots fired at Minnesota National Guard and police team
CNN
Now playing
02:10
Fauci: We'll get Johnson and Johnson vaccine back 'in some manner'
(CNN) —  

Amid an ongoing measles outbreak, New York is requiring schoolchildren to be vaccinated, even if parents have religious objections.

Gov. Andrew Cuomo signed legislation Thursday that removes nonmedical exemptions from school vaccination requirements. The law goes into effect immediately, his office said.

The move, which comes despite opposition from anti-vaccination activists and religious freedom advocates, puts New York alongside other states that do not allow nonmedical exemptions: California, Mississippi, West Virginia and Maine.

“The science is crystal clear: Vaccines are safe, effective and the best way to keep our children safe. This administration has taken aggressive action to contain the measles outbreak, but given its scale, additional steps are needed to end this public health crisis,” Cuomo said in a statement Thursday.

“While I understand and respect freedom of religion, our first job is to protect the public health and by signing this measure into law, we will help prevent further transmissions and stop this outbreak right in its tracks,” he said.

Cuomo signed the bill immediately after the Legislature passed it; the Senate voted 36-26 and the Assembly voted 77-53. The bills were introduced in January.

“We are dealing with a public health emergency that requires immediate action,” state Sen. Brad Hoylman, sponsor of the Senate bill, said during the vote.

New York has become the epicenter of a measles outbreak in the United States that is now in its ninth month. More than 800 people in New York have become sick, and New Yorkers have infected people in four other states.

This year, 1,022 measles cases have been confirmed in 28 states, marking the greatest number of cases reported in the country since 1992 and since the measles virus was declared eliminated in the country in 2000, according to the US Centers for Disease Control and Prevention.

The states that have reported cases to the CDC are Arizona, California, Colorado, Connecticut, Florida, Georgia, Idaho, Illinois, Indiana, Iowa, Kentucky, Maine, Maryland, Massachusetts, Michigan, Missouri, New Mexico, Nevada, New Hampshire, New Jersey, New York, Oklahoma, Oregon, Pennsylvania, Texas, Tennessee, Virginia, and Washington.

Regarding the new legislation, “this is a great step forward in protecting the public health here in New York,” Ed Day, Rockland County executive, said in a written statement. His county is among those with the highest number of measles cases in the state.

“This law should lead to a substantial increase in vaccination rates and to improved protection of our most vulnerable residents; infants, the immunocompromised and those who have legitimate medical issues. With Rockland being an epicenter of the current measles outbreak, we greatly appreciate that our advocacy and local efforts were heard and acknowledged,” he said.

Most of the cases in New York have been in Orthodox Jewish communities In Brooklyn and Queens with low vaccination rates.

Health authorities in New York say they’ve faced formidable challenges to quell the outbreak: anti-vaxers who specifically targeted the state’s ultra-Orthodox Jewish community, bombarding them with lies that vaccines cause autism.

“We are now countering not only the vector of the measles virus, but we’re countering the vector of the anti-vaxers, and that message – that insidious message – is just as challenging as the most contagious virus on the face of the earth,” said Dr. Oxiris Barbot, commissioner of the New York City Department of Health and Mental Hygiene.

Get CNN Health's weekly newsletter

Sign up here to get The Results Are In with Dr. Sanjay Gupta every Tuesday from the CNN Health team.

New York health authorities face an additional challenge: ultra-Orthodox Jews travel frequently to Israel and Europe, where there have been more than 100,000 measles cases this year.

When asked whether she thought the outbreak would end by the fall in order to keep the country’s measles elimination status intact, Barbot didn’t answer.

“We are working every day, day and night, to ensure that we get the message out that vaccines are safe, effective, and the best way to keep families and communities safe,” she said.

CNN’s Elizabeth Cohen, John Bonifield and Debra Goldschmidt contributed to this report.