Lawyers for the American Civil Liberties Union told a federal judge Tuesday that the Trump administration has taken nearly 1,000 migrant children from their parents at the U.S.-Mexico border since the judge ordered the United States government to curtail the practice more than a year ago.

In a lengthy court filing in U.S. District Court in San Diego, lawyers wrote that one migrant lost his daughter because a U.S. Border Patrol agent claimed that he had failed to change the girl’s diaper. Another migrant lost his child because of an outstanding warrant on a destruction of property charge with alleged damage of $5. One father, who lawyers say has a speech impediment, was separated from his 4-year-old son because he could not clearly answer Customs and Border Protection agents’ questions.

Acting Homeland Security Secretary Kevin McAleenan has said that family separations remain “extraordinarily rare” and occur only when the adults pose a risk to the child because of their criminal record, a communicable disease, abuse or neglect. Of tens of thousands of children taken into custody at the border this year, 911 children were separated since the June 26, 2018 court order, as of June 29, according to the ACLU, citing statistics the organization received from the government as part of ongoing legal proceedings.

While the judge recognized that parents and children might still be separated when a parent is found to pose a risk to a child, the ACLU and others say federal immigration and border agents are splitting up families for minor alleged offenses — including traffic violations — and urged the judge Tuesday to clarify when such separations should be allowed to occur.

“They’re taking what was supposed to be a narrow exception for cases where the parent was genuinely a danger to the child and using it as a loophole to continue family separation,” ACLU lawyer Lee Gelernt said in an interview. “What everyone understands intuitively and what the medical evidence shows, this will have a devastating effect on the children and possibly cause permanent damage to these children, not to mention the toll on the parents.”

The rising tally of child separations adds to the approximately 2,700 children who were taken from their parents during a chaotic, six-week period from May to June 20 last year, when a Trump administration border crackdown triggered one of the worst crises of his presidency.

The policy sought to deter a crush of asylum seekers, who were surrendering as families at the U.S. southern border, by prosecuting parents for the crime of illegal entry and sending their children to federal shelters. Reports of traumatized, crying children led to widespread demands to reunite the families.

Trump ordered federal officials to stop separating families on June 20, 2018, and said it is the “policy of this Administration to maintain family unity” unless the parent poses “a risk” to the child.

Six days later, U.S. District Judge Dana M. Sabraw, a President George W. Bush appointee in San Diego, ordered the Trump administration to reunite the families, a process that dragged on for months because the government had failed to track the families after splitting them up. A still-unknown number of families were separated before the policy officially began.

McAleenan, who at the time signed off on the zero tolerance policy and carried it out as commissioner of U.S. Customs and Border Protection, told the Senate Homeland Security and Governmental Affairs Committee in May that family separations are “extraordinarily rare” and make up a tiny portion of the approximately 400,000 families apprehended this year.

At that time, he testified, about one to three family separations occurred out of approximately 1,500 to 3,000 family members apprehended each day. He also said then that separations occur “under very controlled circumstances.”

Testifying before the U.S. House Oversight and Reform Committee on July 18, McAleenan emphasized that the separation process is “carefully governed by policy and by court order” to protect the children.

“This is in the interest of the child,” he said. “It’s overseen by a supervisor, and those decisions are made.”

But the ACLU and other nonprofit organizations serving immigrants estimated that a small fraction of the 911 children the Department of Homeland Security has taken from their parents since June 2018 have been at risk.

Jennifer Nagda, policy director of the Young Center for Immigrant Children’s Rights, a child advocate for unaccompanied and separated children, told the U.S. House Committee on Oversight and Reform that the group represented 120 children and found that nearly all separations were “contrary to the best interests of the child” and “devastating” to families.

More than 40% of the separated children were 5 years old or younger. Children spent nearly four months in federal custody, on average, in part because it was difficult for lawyers and case workers to locate their parents and assess the reason they were separated.

“DHS officials with no child welfare expertise are making split-second decisions, and these decisions have traumatic, lifelong consequences for the children and their families,” Nagda said in her testimony.