Migrant children at a tent encampment in Tornillo, Tex., in June. Some parents didn’t understand that they would be separated from their children at the border, a report found.CreditCreditMike Blake/Reuters

WASHINGTON — The Department of Homeland Security was so unprepared for the Trump administration’s zero-tolerance immigration policy that its computer systems were unable to track family members separated at the Mexican border and the agency held migrant children in detention centers far longer than the law allowed, a report released on Tuesday found.

Agency officials also gave inconsistent information to migrant parents arriving at the border, so some did not understand that they would be separated from their children, according to the report by the department’s Office of Inspector General.

The agency’s problems in identifying, tracking and reuniting families stemmed from limits in its computer systems, the report said. For example, only one part of Customs and Border Protection, the Border Patrol, had systems that could send information about migrant children directly to Department of Health and Human Services computers.

But the Office of Field Operations, another part of Customs and Border Protection, could not. Customs officers, who staff ports of entry, had to send their information to Health and Human Services in emails with Microsoft Word documents as attachments. (Under federal law, unaccompanied children may be held for no more than 72 hours before being transferred to the health agency’s Office of Refugee Resettlement.)

“Each step of this manual process is vulnerable to human error, increasing the risk that a child could be lost in the system,” the auditors wrote.

The report also concluded that a database said to be developed jointly by the homeland security and health departments to track the separated families did not exist. The agencies would later admit that there was no “direct electronic interface” between their computer systems.

The Department of Homeland Security also detained migrant children far longer than the 72 hours allowed by law in facilities that were designed only for short-term detention.

The report found that 564 children in the Rio Grande Valley in Texas, for example, were kept in these facilities for longer than three days. In the El Paso area, 297 children were detained in the short-term facilities for more than 72 hours, according to the report.

In an emailed statement, Katie Waldman, a spokeswoman for the department, said the inspector general’s report illustrated the “difficulties in enforcing immigration laws that are broken and poorly written.”

Ms. Waldman also criticized the report for including steps the agency took to address migrants seeking asylum legally at ports with those caught by the Border Patrol trying to cross the border illegally. Asylum seekers who arrived at ports of entry were not subject to the zero-tolerance policy, she said.

“This administration will no longer turn a blind eye to illegal immigration and will continue to refer illegal border crossers for prosecution,” Ms. Waldman said.

The report is the first after-action report issued by the watchdog office about the administration’s so-called zero-tolerance policy, announced in April by Attorney General Jeff Sessions.

Under the policy, prosecutors from the Justice Department on the southwestern border were told to charge every illegal entry offense “to the extent practicable.”

A month later, Mr. Sessions announced that the Department of Homeland Security would refer “100 percent of illegal southwest border crossings” for criminal prosecution — a decision that led to the separation of families at the border.

That decision set off weeks of protests, with Democrats and many Republicans calling on Mr. Trump to end the policy.

Facing international condemnation, Mr. Trump signed an executive order in June ending the policy. Later that month, a federal court ordered the government to begin reunifying children with their families. Many of the children, some younger than 5, had been placed in detention centers thousands of miles from their parents.

On Tuesday, Richard J. Durbin, Democrat of Illinois, called on Kirstjen Nielsen, the homeland security secretary, to resign over what he said were misleading statements she made to Congress over the zero-tolerance policy.

Documents obtained under the Freedom of Information Act by two groups seeking greater government transparency — the Project on Government Oversight and Open the Government — suggest that Ms. Nielsen signed off on actions that led to children being separated from their families.

But during a May 15 Senate hearing, Ms. Nielsen told Senator Kamala Harris, Democrat of California, “We do not have a policy to separate children from their parents.”

Mr. Durbin disputed that on Tuesday.

“Secretary Nielsen signed off on this family separation policy, falsely claimed that the policy did not exist, and then callously failed to address the policy’s tragic and inevitable fallout,” Mr. Durbin said on Twitter. “In light of this devastating report, she should resign.”

Ms. Waldman, the homeland security spokeswoman, said the document cited by Mr. Durbin was taken out of context.

“The oft-cited quote pulled from the April 23 memo simply states the premise that D.H.S. has the legal authority to take an action — however, it did not direct a policy of family separation for the purposes of deterrence,” she said. “Conflating authority versus actual policy based on a redacted memo provides a disservice to the public and does not show the full picture of considerations presented to the secretary.”