The city’s child-welfare department has for years failed to conduct required criminal background checks on prospective employees — such as the convicted murderer who is now charged with assaulting a child, state officials revealed Thursday.

“An analysis of background checks shows Administration for Children’s Services was out of compliance with the law requiring them to be run through the Justice Center from 2013 until at least 2017,” Christine Buttigieg, a spokeswoman for the Justice Center for the Protection of People with Special Needs, told The Post.

The dangers of letting even one employee slip through the cracks were laid bare last Friday, when ACS counselor and convicted killer Jacques Edwards, 55, allegedly slammed a 6-year-old boy into a filing cabinet.

A law instituted in 2013 requires ACS to ask the state Justice Center to check the criminal history of any job applicant “who will have regular and substantial unsupervised or unrestricted physical contact with children.”

But soon after the law took effect, ACS began ignoring it, according to reps from the Justice Center, who said the city only sporadically requested the legally required background checks since 2013.

ACS should have asked the state for a check on Edwards — who served three decades behind bars for murder and was paroled in 2010 — but failed to do so.

It is unclear how many others were ushered into service without required vetting.

The New York State Office of Children and Family Services “is currently conducting a thorough audit of personnel files and is prepared to take any action necessary to secure the safety of the children in the care of ACS and ensure ACS’ compliance with state law,” ­Buttigieg said.

ACS claims new Commissioner David Hansell fixed the issue while cleaning up the mess left behind when former commissioner Gladys Carrion resigned in disgrace in 2017.

“As part of Commissioner Hansell’s top-to-bottom reforms at ACS over the last year and a half, we have made substantial changes in the vetting process, which includes conducting background checks through the Justice Center, in addition to the checks conducted by [Department of Citywide Administrative Services],” ACS spokeswoman Marisa Kaufman said.

ACS is “conducting a full investigation” to understand what its own “hiring process was prior to” Hansell taking over, and is reviewing current staff’s backgrounds, she said.

DCAS did conduct a check on Edwards, according to ACS officials.

Mayor Bill de Blasio on Thursday promised Edwards’ days working with kids are over.

“That individual will not be working ACS in the future and will go nowhere near children,” he said.

The 6-foot-3, 255-pound Edwards, who was charged Monday with assault, has admitted to tossing the tyke, but claims the 6-year-old was attacking him.

“He grabbed my arm, he tried to rip my scar off,” Edwards told The Post Thursday.

Additional reporting by Tamar Lapin