A state appellate court ruled unanimously on Thursday that New York City must keep open 19 schools it wanted to close for poor performance, blocking one of the Bloomberg administration’s signature efforts to improve the educational system.

The ruling, by the Appellate Division, First Department, in Manhattan, upheld a lower court finding that the city’s Education Department did not comply with the 2009 state law on mayoral control of the city schools because it failed to adequately notify the public about the ramifications of the closings.

Because many eighth graders assumed the schools would be closed and the Education Department discouraged them from attending the schools, few applied. Some of the schools could begin September with just a few dozen freshmen. School officials said they expected enrollment to grow with students who move into the city, but the number will still likely be far smaller than in past years.

Since taking office in 2002, the mayor has closed 91 schools that regularly posted low test scores or graduation rates and has replaced them with smaller schools, on the premise that the more intimate environments served struggling students better. Studies have shown that students in the new schools have fared better than their predecessors in the larger schools, but some other large schools have suffered from having to absorb more struggling students.