A House committee has produced what it calls the “first complete narrative” of the Trump administration’s “zero tolerance” immigration policy that separated thousands of migrant children from their families at the U.S.-Mexico border, with committee Democrats warning that “hundreds” of children may never be reunited with their parents as a result of the since-rescinded policy.

The Democratic majority staff of the House Judiciary Committee released the findings in a lengthy report Thursday morning, days before the presidential election, following a nearly two-year investigation. It said it found “reckless incompetence and intentional cruelty” within the program.

The report found what largely already has been revealed publicly: that the Trump administration secretly planned the family separations as a tactic aimed at deterring migrants from seeking asylum in the United States amid fears that their children might be taken from them. The policy particularly targeted Central American families that were streaming to the U.S. southern border, and the Trump administration ran a pilot program in El Paso in 2017 before expanding it in 2018 despite concerns that there was no orderly way to track or monitor the children and their families once they were separated.

Committee Democrats also reported that they found that more than 850 complaints about family separations were filed with the Department of Homeland Security’s Office for Civil Rights and Civil Liberties, including allegations of mistreatment involving children.

Committee Chairman Jerrold Nadler (D-N.Y.) ordered the inquiry in January 2019, after Democrats took control of the House. Many of the key details have been disclosed in government watchdog reports, news stories and in an ongoing federal lawsuit that ordered that the families be reunited. But the report said previously undisclosed documents were obtained, such as memos and emails, that offered a fuller timeline of a “sad chapter” in U.S. history.

“As a result of this dark chapter in our nation’s history, hundreds of migrant children may never be reunited with their parents,” the report concluded. “We remain committed to holding the Trump Administration accountable.”

The committee said that the Department of Health and Human Services, which was responsible for housing the children in shelters, was the only agency that “meaningfully cooperated” with its investigation, and that DHS and the Justice Department did not.

DHS, the Justice Department and HHS did not immediately respond to requests for comment Thursday; committee staff members had said they were not planning to share the report with the agencies until Thursday morning.

The panel released the report a week after advocates for immigrants told a federal judge overseeing the reunification process — which is mostly completed — that they have not been able to reach the parents of 545 children to find out whether they have been able to get their children back. Lawyers estimate that as many as 5,400 children were taken from their parents under the government’s separation program. More than half were split up during the official “zero tolerance” policy in 2018.

U.S. government officials have said some parents have indicated that they do not want to claim their children — who are staying with sponsors or other family members in the United States — because it could mean the children would be forced to leave the country.

“DHS has taken every step to facilitate the reunification of these families where the parents wanted such reunification to occur,” DHS spokesman Chase Jennings said last week.

Past administrations have separated migrant children from their parents at the border, such as in emergencies when the parent is considered a danger to the child.

But the Trump administration’s decision to split up families to keep President Trump’s campaign promise of deterring border crossings stunned the world and even members of the Republican Party, who urged him to overturn it. The episode is widely viewed as one of his administration’s biggest blunders because officials did not have a plan to put the families back together, and it drew outrage when it was revealed publicly.

The House committee found that the Trump administration began planning the separations as early as February 2017, when then-Customs and Border Protection Commissioner Kevin McAleenan held a meeting with HHS officials “in which the idea of family separation was raised.” McAleenan later said he regretted the family separation policy.

By March 2017, the number of children the U.S. government had separated from their families and was sending to HHS custody was increasing. In July 2017, the report said, the Trump administration was secretly running a pilot program that separated families in CBP’s El Paso sector. Hundreds were split up during that early phase of the program, the committee found.

During the pilot program, officials realized that they did not have a quick and orderly system to reunite the separated families. But the committee found that the Trump administration went ahead with its “zero tolerance” policy in May 2018, separating thousands of children from their parents.

Under zero tolerance, border agents sent parents to criminal court to face prosecution for the typically minor crime of crossing the border illegally, and then to immigration detention for possible deportation. Their children were scattered in HHS shelters nationwide.

Trump abruptly ended the separations in June 2018 amid international protests over the physical and psychological harm the practice was inflicting on children and parents — one man died by suicide after his son was taken away — but reuniting most of them took weeks or months, and in some cases, is still ongoing.

The committee also found that more than 860 complaints involving family separations were filed with the DHS Office for Civil Rights and Civil Liberties. Complaints include claims that minors were mistreated in immigration custody, such as an 8-year-old “who was reportedly kicked or hit with a shoe” by CBP officers to wake him up.

In another instance, HHS took 37 children younger than 12 to an Immigration and Customs Enforcement detention facility to be reunited with their parents. After the children waited at the facility for eight hours, HHS took them back to a bus to await processing.

Border apprehensions sank to near-historic lows during Trump’s first few months in office, but rose steadily in fiscal 2018 and surged in fiscal 2019 as smugglers realized that the government was unable to stop the flood of “family units” crossing the border because of legal limits on how long the U.S. government can detain children.

A record number of families and unaccompanied minors, mostly fleeing violence and economic instability in northern Central America, surrendered in large groups at the southern border.

Trump has since deployed other measures to curb border crossings, such as the Migrant Protection Protocols, a program that requires migrants to remain in Mexico while they wait for their U.S. asylum hearings. More than 65,000 migrants have been sent to Mexico under that program, according to DHS.

More recently, Trump has used the coronavirus pandemic to bar foreign nationals from entering the United States.