Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — The Department of Homeland Security was not ready to carry out the Trump administration's family separation policy, and some of the government's practices made the problem worse, according to a report issued Tuesday by the department's inspector general.

Under the policy, announced in April but abandoned in June after a public outcry, adults arriving illegally were charged with a crime, and their children were put in separate holding cells until they could be transferred to long-term custodial care.

"DHS was not fully prepared to implement the administration's zero-tolerance policy or to deal with some of its after-effects," said John Kelly, the acting inspector general.

Tuesday's report said Customs and Border Protection held children for long periods in facilities intended to be used for only short terms, lacked the ability to reliably track children separated from their parents, and in some cases failed to adequately inform parents about the separation policy.

The inspector general also said that while the Trump administration urged asylum seekers to come through ports of entry, CBP officers were overwhelmed and regulated the flow into those facilities. "Backlogs created by these competing directives likely resulted in additional illegal border crossings," the report said, when families grew tired of waiting and looked for other ways to enter the country.

Immigration law allows CBP to hold unaccompanied children for up to 72 hours before transferring them to the Office of Refugee Resettlement, because the facilities often lack adequate bedding or separate sleeping rooms for children. But the report found the limit was succeeded often. About one-fifth of the children were held at least five days, and one child remained in custody for 12 days.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Computer systems used by CBP and Immigration and Customs Enforcement lacked the ability to share data about parents whose children were separated from them. And those systems were not integrated with the resettlement agency.

"DHS struggled to provide accurate, complete, reliable data on family separations," the report said, despite a DHS announcement in late June that the government had a central database.

A DHS official said the report understated efforts to reunify children and their parents who were separated during enforcement of the zero-tolerance policy. "The government took exhaustive efforts to overcome the challenge and stand up a process to safely reunify families expeditiously," said Jim Crumpacker, director of the office that responds to inspector general reports.

A DHS spokeswoman, Katie Waldman, said Tuesday that the report's findings only "illustrate the difficulties in enforcing immigration laws that are broken and poorly written."

"The report fails to understand where the Zero Tolerance Policy took effect: in between the ports of entry. CBP has and will continue to accept and process claims of credible fear at the ports of entry in addition to protecting the safety and security American communities from nefarious actors and drugs," Waldman said in a statement. "This administration will no longer turn a blind eye to illegal immigration and will continue to refer illegal border crossers for prosecution. We are committed to enforcing the rule of law and ensuring that there are consequences for illegal actions."

In a separate DHS inspector general report dated September 27, the Adelanto ICE Processing Center, a detention center housing up to 1,940 ICE detainees in California, was cited for serious violations including nooses found hanging in detainee cells, “improper and overly restrictive segregation,” and “untimely and inadequate medical care.”

"I've seen a few attempted suicides using the braided sheets by the vents and then the guards laugh at them and call them 'suicide failures' once they are back from medical," a detainee said, according to the report.

Adelanto has housed multiple fathers separated from their children, NBC News has previously reported. Attorneys for the detained fathers say many were coerced into signing away the right to be reunited with their children.

On a tour inside the Adelanto facility, NBC News witnessed a detainee in isolation under what ICE said was medical supervision laying on the floor, curled up by the door of a cell.

In a statement, ICE spokeswoman Lori Haley said "the safety, rights and health of detainees" are of "paramount concern" and noted that the Adelanto detention facility is "subject to stringent, regular inspections."

"ICE takes seriously the OIG’s findings, and has agreed to conduct a full and immediate review of the center to ensure compliance with detention standards and expedite necessary corrective actions," Haley said.

The report noted that ICE and the Geo Group, the private company which operates the facility, would address the violations.

In late September, the government reported that it had reunified or released 2,251 children out of the 2,654 who were separated from a parent under zero tolerance.