Fifty-one students were wrongly told they didn’t receive spots at Lab Middle School in Manhattan, officials revealed two weeks after a similar error occurred at a high school in the same building.

The department was calling affected families on Thursday to notify them of the mistake and their new offer.

Education department officials said the error with the middle school’s rankings was separate and unrelated to the high school mishap, but the department will “take a close look” at Lab’s internal processes and at all schools that screen students to prevent future mistakes, said Doug Cohen, a department spokesman. None of the total 204 offers that have gone out for Lab Middle School will be rescinded.

“The admissions process has to work for families, and we apologize for the frustration this school error has caused parents and students,” Cohen said. “We’re providing offers to every student who should have received one, and the Executive Superintendent and Superintendent are working closely with the school community to ensure the needs of all students are met.”

Officials would not say what the exact error was, except that it happened as school officials ranked applicants to the middle school. The school had a chance to preview its offers before they were sent out on April 15, but no one caught an error until a parent asked for their child’s ranking, a department official said. The school reached out to the education department late last week when officials there realized there was a problem.

The department does not expect the school to exceed capacity with these new offers. It will hold open houses for new students and to address programming and building space an official said.

When Lab High School’s error affecting nearly 150 students was reported earlier this month, parent leaders raised concerns about whether there was a downstream effect: if one student was improperly matched, then what happened to the spot that student chose instead, and did it belong to another student?

The department pushed back on that idea Thursday, saying that there was a “small enough” number of students assigned to any one school who have now been admitted to Lab Middle School.

Families have until May 10 to decide whether they’ll attend Lab Middle School or accept their original offer, an official said. After the high school’s error, the department gave new offers to the students who should have received them in the first place.

Robin Broshi, president of District 2’s Community Education Council, said the department’s handling of this second error was “proactive” compared to the high school mishap, and officials made an “earnest” effort to reach out to families and parent leaders. But her concerns about the admissions process remained.

“We need to be working together to understand how these mistakes happened and how to make sure this doesn’t happen again,” Broshi said.