New York State has ordered the de Blasio administration to hire an independent monitor to oversee its child-welfare agency after city caseworkers repeatedly failed to protect 6-year-old Zymere Perkins from family beatings that eventually killed him, according to a state report.

Staff of the city’s Administration for Children’s Services did not adequately probe the family situation of Perkins, conducted “poor quality” interviews and failed to identify mental illness and domestic violence in the child’s family, according to the report from the state’s Office of Children and Family Services.

“The level of casework activity for all cases was insufficient and was particularly lacking given the family circumstances,” according to the 26-page document.

Perkins, of Harlem, died on Sept. 26, 2016 after he was punched and beaten with a broom. His mother and her boyfriend have both been arrested on charges related to his mistreatment.

The report said that the doctor who observed Perkins said the child appeared to be 3 years old and could have been dead for about 17 hours prior to his arrival at the hospital.

On Tuesday evening, de Blasio said he had ordered the firings of three employees involved in the case and moved to suspend and demote six others. Those personnel moves came a day after the abrupt resignation of the city’s child-welfare commissioner, Gladys Carrión.

“The buck stops with me,” according to de Blasio’s statement, coordinated with the release of his own report calling the death “an unacceptable tragedy.”

“This mission of ACS is to ensure the welfare of every child, but in this case, the city failed,” the report said.

Earlier Tuesday, de Blasio suggested hiring a monitor was his administration’s idea; he did not mention the state had ordered the move.

De Blasio said the resignation of Carrión — who had worked in child protection for decades — happened because she was “exhausted.”

“I think for Gladys — just a life of this very grueling, tough work really — it became a point where she just felt exhausted, and she felt she had done all she could do, and that she needed to retire. And I think people get to that point when they do very tough jobs,” he said of Carrión, who once led the state agency that issued the report and ordered the hiring of the independent monitor.

According to the city’s probe, Perkins had been the subject of five child-welfare reports — three found to have merit, the others unfounded. The state report said that investigators found allegations of abuse of drugs or alcohol, as well as “fractures, excessive corporal punishment, and inadequate guardianship.”

Carrión, one of de Blasio’s first appointees upon becoming mayor in 2013, has managed the agency amid several high-profile deaths of children whose cases were on its radar.

Earlier this month, Jaden Jordan, 3, died after being discovered unconscious and covered in feces in his Brooklyn home. Two toddlers died from a steam-heater accident inside a Bronx apartment building being used as a homeless shelter, and their parents had been questioned before the deaths by Carrión’s agency.

During a City Council oversight hearing in October triggered by the Perkins case, Carrión cried while recounting the city's responsibility to protect children.