New York City has violated the rights of about 900,000 of its residents with disabilities by failing to accommodate for their needs during emergencies, a federal judge ruled on Thursday.

The ruling arose from a lawsuit filed in 2011 after Tropical Storm Irene, but came into sharper focus after Hurricane Sandy, when many New Yorkers with disabilities were stranded for days. The judge, Jesse M. Furman of Federal District Court in Manhattan, found that the city, through “benign neglect,” was in violation of the Americans With Disabilities Act.

The plaintiffs, which included two nonprofit groups representing people with disabilities and two individuals — a man who is blind and a woman who uses a wheelchair — sued the city after Tropical Storm Irene, which failed to do much damage in the city but nonetheless prompted a large-scale evacuation.

The lawsuit sought class-action status, and in November 2012 Judge Furman granted that request, which allowed the case to proceed on behalf of the city’s disabled population.