It was a disaster waiting to happen.

That’s what the New York City Department of Investigation concluded in a 24-page report on a violent rape committed last year by three troubled youngsters who had run away from a group home in Brooklyn.

For years, the Department of Investigation found, the city’s child welfare agency had failed to adequately monitor the Brooklyn home and others like it throughout the city. According to the report, the agency, known formally as the Administration for Children’s Services, lacks sufficient protocols to respond to escapes or violent incidents at the homes; its inspectors do not visit the group homes nearly enough to ensure safe conditions; its contracts with the nonprofit providers who run the homes do not even contain specific safety requirements; and ACS has not developed a way to effectively evaluate the performance of the homes.

A spokeswoman for ACS did not immediately respond to a request for comment on the report, but DOI notes that ACS officials agreed with the investigation department’s findings and have begun implementing corrective measures — hiring more staff, for instance, and increasing the frequency of inspections.

The report said such fixes were urgently needed. Given the agency’s “systemic failure” to oversee the homes — small facilities meant to house juveniles who have committed low-level crimes — last year’s rape was “all but inevitable,” and “there can be no guarantee against further incidents,” the report said.

The Department of Investigation also announced the arrests of three current or former group home workers, all of whom had worked for Boys Town, a Nebraska-based nonprofit that ran the home in Brooklyn. Drawing on hours of surveillance footage recorded by Boys Town, DOI investigators found that the workers failed to monitor youth in their care and falsified logbooks. In several instances, the workers said in logbooks that teenagers were safely asleep in their beds when the video showed the workers were asleep themselves.

The report represents the latest blow for a program that New York policymakers had envisioned as the future of treatment for juvenile offenders. The program, known as Close to Home, was instituted in April 2012. Its central aim was to keep New York City youth who’d been convicted of crimes closer to their relatives and communities, in group homes that were meant to resemble a family-like atmosphere. The idea was that the homes would provide the teens a better chance at rehabilitation and reform than had the notoriously violent and scandal-ridden youth prisons upstate. The homes in the city were not locked, but the youngsters assigned to them were to be under 24-hour supervision.

But as ProPublica reported in 2015, the implementation of the program was rushed and beset with problems from the beginning. The nonprofit organizations who contracted with the city complained that they were insufficiently prepared. Children ran away on hundreds of occasions, sometimes committing violent crimes. In 2014, there were 177 arrests made of children living in the homes. In June 2013, a 17 year old fled a Staten Island home and allegedly stabbed a man to death in Queens.

The city had acted to curtail the number of runaways and subsequent arrests when, in June 2015, three boys ran away from the Boys Town home in the Park Slope section of Brooklyn. The boys, according to authorities, met a woman at an internet café in Chinatown, took her into the hallway of a nearby apartment building, then beat, robbed and raped her. Earlier this year, the boys pleaded guilty to rape, robbery, and burglary counts.

In the summer of 2015, a ProPublica reporter interviewed one of the boys on Rikers Island, where he had been jailed. He said that he and his accomplices had frequently and easily run away from the group home. They rigged the alarm system so that it would not alert employees when they escaped out of a window, he said. They had also routinely smuggled cocaine, marijuana and ketamine into the home and used the drugs in their rooms, the boy said.

New York City terminated Boys Town’s $6.4 million dollar contract to oversee troubled youth as part of the Close to Home program in June 2015, three weeks after the rape. It was the third such agency to lose its contract following problems with runaways.

Even after the 2015 rape, the Department of Investigation found that the incident had only a marginal impact on the frequency with which Boys Town employees conducted bed checks. Over the 12 nights following the rape, employees only conducted 98 of 192 required bed checks, a rate of 51 percent. In the 25 nights before the rape, employees checked beds at a rate of 15 percent.

Widespread Problems With Group Home Agency Prompt City to Cut Ties

Boys Town becomes third agency to fail as New York City tries new model for juvenile offenders. Read the story.

According to the most recent figures available, there are currently about 30 homes caring for more than 150 boys and girls each month.

In an emailed statement, a spokesperson for Boys Town said “these allegations, if true, fail to meet the core values of Boys Town and our mission of caring for at risk children and families. We have taken clear, specific steps to ensure that they do not happen in the future. Our focus remains on our core mission: changing the way America cares for children, families and communities.”

Update, April 13, 2016: In a statement, an ACS spokeswoman defended the Close to Home program and detailed improvements she said the agency was making to it:

“Until recently, New York City's youth were shipped hundreds of miles from their homes and communities, which negatively impacted both the youth and the communities they returned to,” the spokeswoman said. “Close to Home is a massive transformation in the City's approach to juvenile justice and along with other juvenile justice reforms, has led to an all-time low youth crime rate.”

She added that runaways had continued to decrease in recent years and that ACS was working with the New York Police Department to increase the safety of Close to Home facilities. She said that Mayor de Blasio had authorized a $4 million dollar budget increase, allowing for 35 new hires to assist in tightening oversight of the program.

Correction, April 13, 2016: An earlier version of this article reported that four people had been arrested as a result of the Department of Investigation’s inquiry. DOI has amended its report to say only three people had been arrested.