New York City’s biggest measles outbreak in nearly 30 years, which predominantly sickened ultra-Orthodox Jewish residents of Williamsburg and Borough Park, has ended.

According to Health Department officials, 42 days, or two consecutive incubation periods for the highly contagious virus have passed, allowing the city to declare itself measles-free. The last recorded infection was in mid-July. An emergency order in place since April that required measles vaccination for all people who lived, worked or attended school in four Brooklyn zip codes has been lifted.

“There may no longer be local transmission of measles in New York City, but the threat remains given other outbreaks in the U.S. and around the world,” Health Commissioner Oxiris Barbot said at a press conference on Tuesday. “Our best defense against renewed transmission is having a well-immunized city.”

Since the outbreak began in early October, 654 New York City residents got sick, 73 percent of whom were unvaccinated children. Fifty-two people were hospitalized and 16 of those people were admitted to intensive care units, according to the Health Department.

“The response to this outbreak has been nothing short of epic,” Barbot said, adding that 547 health department employees worked more than 1,000 hours. In total the response efforts cost the city more than $6 million.

Efforts to quash the outbreak were met by pushback from anti-vaccine activists at every turn, she said.

“We faced sustained resistance from anti-vaccination forces who continued to hold rallies and scare parents,” Barbot said. “These campaigns of fear and lies put New Yorkers at risk. We had to do more than the anti-vaxxers.”

While no one died in New York City’s outbreak, an Israeli flight attendant who caught the virus while traveling from New York to Tel Aviv died from complications in mid-August, according to Times of Israel. All those hospitalized have recovered, though some severe, long-term complications of measles can occur months and even years later, officials said.

The height of the outbreak occurred in April, with nearly 200 cases. Those numbers began to decline in the following months, after the city declared a public health emergency. Immunization rates for children in affected neighborhoods jumped in that time, from 88 percent before the outbreak to now nearly 99 percent in Borough Park and from 67 percent to 95 percent in Williamsburg, officials said.

As part of the city’s emergency order, people who refused vaccination for themselves or their children could be fined $1,000. The city doled a total 232 of those summonses to parents for failing to get their children vaccinated, and about 29 have had to pay fines after an administrative hearing. Some of the cases are still pending and another 159 were canceled after the family either got their child vaccinated or showed proof of measles immunity from a blood test.

In the years leading up to this most recent outbreak, ultra-Orthodox areas saw a decrease in immunization rates, and a spike in religious exemptions, Gothamist and WNYC reported. The trend was largely fueled by misinformation about the supposed dangers of vaccines, spread by a handful of anti-vaccination activists within the Orthodox community who had ties to the national, secular anti-vaccine movement, and propagated their ideas with glossy hand-delivered pamphlets, robocalls, hotlines for fearful moms and massive symposiums with hundreds of attendees.

Members of the ultra-Orthodox community who supported vaccination countered with their own informational pamphlets, call-in sessions, hotlines and events. Nurse practitioner Blima Marcus, one of the organizers of these efforts, said she’s relieved the outbreak is over, but that her work is far from done.

“If anything, the concerns have ramped [up], because now people need to vaccinate their school aged-children,” Marcus said. “We’re getting a lot of emails. We’re getting hundreds of phone calls.”

She’s referring to the change in state law enacted in June, where legislators abolished religious exemptions to vaccines, meaning all school children (except those with medical exemptions approved by the State Health department) have to be immunized when they return to class, with a grace period of 14 days from the start of school for children to get their first round of shots and 30 days to schedule all required boosters. About 7,000 New York City had religious exemptions and another 20,000 across the state, at last count. All of those religious exemptions are now void. Some staunch anti-vaccine parents are considering home-schooling their children or leaving the state, rather than vaccinate, WNYC reported.

Most of the mothers Marcus interacts with are terrified and confused and trying to do what’s best for their children, she said.

“There’s still so many women out there that now know that they need to vaccinate but they haven’t yet gotten their concerns dealt with,” Marcus said. “I was never here to force people to vaccinate. I was really trying to do work in helping people make that decision and feel comfortable about it; and right now they need it more than ever.”

While the majority of measles infections occurred among ultra-Orthodox communities, the government response to the outbreak spurred pushback from anti-vaccine activists from all over the state and the country--some Amish, some Mennonite, others affiliated with alternative private schools Waldorf schools. They filed multiple legal challenges in federal and state courts, they turned out in droves to lobby lawmakers in Albany and they packed courtrooms when their cases were heard. So far legal challenges to reinstate the religious exemptions have proven unsuccessful, though attorneys have promised to file an appeal in a state lawsuit challenging it this week.

While New York City may have addressed its measles problem for now, outbreaks in other parts other parts of the state are ongoing, threatening to end the nation’s measles elimination status, according to the Centers for Disease Control and Prevention. There were 16 documented cases during the month of August, according to spokeswoman Jill Montag, with 5 in Rockland County, 2 in Orange County, 5 in Sullivan County and 4 in Wyoming County.