WASHINGTON — The internal watchdog for the Department of Homeland Security found that the Trump administration anticipated it would separate 26,000 children if the "zero tolerance" policy of 2018 had been allowed to continue, and that the agency knew it lacked the technology to track and reunite children with their parents.

Officials at Customs and Border Protection, the DHS agency responsible for separating families under the May-June 2018 policy, estimated in May of that year that it would separate more than 26,000 children by September, according to the report from the DHS Office of Inspector General, released publicly on Wednesday. After mounting pressure, President Donald Trump signed an executive order ending the policy on June 20, 2018.

Previously, the administration has said in court that an estimated 2,800 children were separated as a result of zero tolerance. But the report released Wednesday said that the lack of technology to track which children had been separated meant the agency had to revise that estimate to 3,014.

In an earlier report, the inspector general's office found another 136 children with potential family relationships that had not been reported and an additional 1,233 children who had potentially been separated before separations began.

"Without a reliable account of all family relationships, we could not validate the total number of separations, or reunifications," the earlier report said.

Wednesday's report said CBP officials forged ahead with the policy even though they knew ahead of time that the agency lacked the proper technology to track and reunify children with their parents.

"Because of these IT deficiencies, we could not confirm the total number of families DHS separated during the Zero Tolerance period," the report said.

DHS did not immediately respond to a request for comment about the report.

The 60-page report said that CBP officials knew about the deficiencies in their data and technology system when they were planning zero tolerance, and still estimated they would separate 26,000 children without a clear plan to track and reunify them with their parents.

NBC News has previously reported that the Trump administration had "no way to link" separated migrant children to their parents, according to internal emails.

DHS eventually added features to its system that would allow officers to record the separation and reunification of family members, as well as the time the child spent in custody, but it was not until August 2018, after the policy had ended, the report said.

The poor tracking not only led to the potential for separated children to get lost in the system, it also led to chaotic reunification efforts as officers struggled through a lengthy process to determine family relationships. In one case in July 2018, 37 migrant children were left waiting in vans in a parking lot outside an ICE facility in Texas where their parents were being held because there was not a clear process to match them with their parents.

"Under a normal operational cadence, we would have tweaked or adjusted DHS data systems, trained our officers, prepared our detention providers. But not one of these steps were taken," said Andrew Lorenzen-Strait, former ICE deputy assistant director for custody management who now works at the Lutheran Immigration and Refugee Service as the director for children and family services.

Julia Ainsley reported from Washington, and Jacob Soboroff from Los Angeles.