(CNN) A massive measles outbreak that spread across parts of Brooklyn since October has ended, New York City health officials announced Tuesday. This marks the end of the largest measles outbreak New York City has seen in nearly three decades.

Measles outbreaks are typically declared over when two incubation periods for measles -- which is about 42 days -- have passed since the last day a person with measles is infectious in an affected area. That time period has now passed for the people most recently infected with measles and reported to the New York City Health Department , according to the city.

No new cases have been reported since mid-July, the city's health department said, but officials will continue keeping track and may add cases retrospectively as they are identified. The city also could see future measles cases emerge that are not associated with this outbreak.

"Ending the measles outbreak required extensive collaboration with community organizations and Jewish leaders. They helped encourage vaccinations and achieve record immunization levels in parts of Brooklyn," New York City Mayor Bill de Blasio said in a written statement on Tuesday.

"As we head back to school this week, we just remain vigilant. To keep our children and communities safe, I urge all New Yorkers to get vaccinated. It's the best defense we have," de Blasio said.

Fighting the outbreak

To battle the outbreak, the city spent more than $6 million and dedicated more than 500 staff to work on response efforts, which included disseminating messages for people to get vaccinated and hosting community events.

Since the outbreak began in October, more than 5,000 measles, mumps and rubella vaccinations have been administered, according to the city.

In April, the city declared the outbreak to be a public health emergency , and that unvaccinated people living in select ZIP codes were required to receive the measles, mumps and rubella vaccine to curtail the outbreak and protect others.

"Measles is one of the most contagious diseases on the face of the earth," New York City health Commissioner Dr. Oxiris Barbot said in the new statement.

"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. Our best defense against renewed transmission is having a well immunized city," Barbot said. "Vaccination coverage has increased significantly since the emergency order, which has been supported by community-led efforts. We are grateful to the New Yorkers who shared the truth about vaccines and protected the health of their friends and neighbors through this outbreak."

The nation's measles elimination status still at risk

Even though the outbreak has been declared over in New York City, the measles virus is still circulating in other regions of New York and the United States -- which means there's still a chance that the United States could lose its measles elimination status in October because of ongoing measles outbreaks in New York state.

The World Health Organization removes a country's elimination status when measles has been spreading continuously for one year.

The measles outbreak in New York City started on September 30, 2018, and has caused more than 600 confirmed cases of measles.

Another outbreak in nearby Rockland County, New York , started the next day and has caused more than 300 cases -- and that outbreak is still ongoing.

Those two outbreaks have largely been among children in the ultra-Orthodox Jewish community whose parents have refused to vaccinate them.

As of last week, about 30 other states have had measles cases in the past 12 months, but those were much shorter-lived than the ones in New York.

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.

"It certainly is incredibly frustrating and upsetting to the public health community that we may lose measles elimination status, because we do have a safe and effective vaccine," Dr. Nancy Messonnier, director of the US Centers for Disease Control and Prevention's National Center for Immunization and Respiratory Diseases, said last week.