A federal judge ruled that D.C. must provide incarcerated students with their legally mandated special-education services, which the students allege the city’s school system has not delivered during the public health emergency.

U.S. District Judge Carl J. Nichols delivered the injunction late Wednesday, saying that the District’s school system has 15 days from the order to give incarcerated students an adequate education. The judge said city officials must document the special-education needs of each student so the court can ensure students are receiving the necessary services.

The ruling came two months after incarcerated students filed a class-action suit arguing that they were only given academic packets during the coronavirus pandemic, not the special-education services that they are supposed to receive. Lawyers had sent a letter to city leaders last August warning officials that they believed they were in violation of federal law because they were not giving incarcerated students live instruction, virtually or in-person.

The judge issued the injunction before the full lawsuit has made its way through court, a sign the inmates made a strong case that they haven’t received an adequate education and need an immediate solution, the judge’s opinion said.

The roughly 40 students in the class-action suit attend the D.C. Public Schools-operated Inspiring Youth Program, which is on-site in the D.C. jail complex.

The program serves students between the ages of 18 and 22.

All are eligible for special-education services, the suit says.

“It’s really an acknowledgment that the situation has been dire since 2020 and that the court’s involvement is necessary to make these changes,” said Stephanie Madison, an attorney with Terris, Pravlik & Millian and a co-counsel on the case.

For much of the pandemic, the 1,500 people held at the D.C. jail had been confined to cells 23 hours a day — lockdown measures that experts called a grave human rights abuse.

Chancellor Lewis D. Ferebee said that the school system has provided the students with an education, but the stringent coronavirus safety restrictions in the jail have hampered the ability to provide services. The plaintiffs’ lawyers argue that teachers could have provided students at least with live virtual instruction.

Ferebee said the school system would comply with the judge’s order.

“The pandemic presented unique challenges that our staff worked to adapt and address, and we will continue to strive to provide a strong foundation for these students during the remainder of our partnership with [the Department of Corrections].”

The academic year ends Thursday, and the D.C. public school system is terminating its partnership with the Department of Corrections at the end of the academic year. The department will need to seek a new partner to provide education services to students in custody.

The suit also names the city and the Office of the State Superintendent of Education, the agency that will continue to be responsible for ensuring these students receive their special-education services even after the D.C. Public Schools contract lapses.

Inspiring Youth Program has a summer school component.

In the initial lawsuit, one of the plaintiffs — who was listed under a pseudonym — said he did not receive any mental health services, which was part of his special-education plan. He also said he did not receive academic instruction or any feedback on the assignment packets he completed.

The students’ lawyers, who include attorneys from the School Justice Project and Washington Lawyers’ Committee, said they were able to connect with one of their clients this week to inform him of the injunction.

“He said he was so proud and hopeful that it is going to return to full classes soon,” Madison said.

Some teachers started visiting their students in jail in May, but attorneys said there has not yet been a consistent school schedule.