Nearly one third of the unaccompanied minors separated from adults at the border under President Trump's zero-tolerance policy were detained by U.S. Customs and Border Protection longer than the 72 hour legal limit before they were turned over to Health and Human Services, according to a new report released Tuesday.

The Department of Homeland Security's Office of the Inspector General visited CBP and U.S. Immigration and Customs Enforcement processing facilities in El Paso, Texas, and McAllen, Texas, in late June, following Trump's executive order calling for an end to family separation.

The IG concluded the department as a whole "was not fully prepared to implement the Administration’s Zero Tolerance Policy or to deal with some of its after-effects" and "held alien children separated from their parents for extended periods in facilities intended solely for short-term detention," according to the report.

The inspector general's office found that during the six weeks zero-tolerance was in effect, nearly 33 percent of all children separated were not transferred to an HHS facility within three days. Some sectors were worse — for example, 44 percent of children detained from the Rio Grande Valley were not transferred in the first three days, and that number was 40 percent in the El Paso sector.

The seven other Border Patrol sectors on the southwest border were better, but still failed to meet the standard 13 percent of the time.

The report didn't provide the total number of children affected, but it could exceed 1,000. In just the Rio Grande Valley sector, 564 children were held longer than three days.

Border Patrol officials told the inspector general's office they held children because of "HHS' inability to accept placement of unaccompanied alien children promptly."

"CBP officials also cited other possible reasons for extended detention, including the need to provide an unaccompanied alien child with medical care or delays in transportation arrangements provided by ICE," the report said. "However, other evidence indicates that CBP officials may have inadvertently omitted critical information from unaccompanied alien children placement requests submitted to HHS, which could have also contributed to delays."

DHS responded to the bombshell report Tuesday afternoon but did not specifically address the excessive detention times for unaccompanied children.

“The findings of OIG report 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," said DHS spokeswoman Katie Waldman.