The Trump administration has separated more than 900 migrant children from their parents at the southern border by exploiting a legal loophole in a preliminary court injunction intended to speed up the reunification of families, according to a court motion filed by the American Civil Liberties Union.

Interested in Immigration?

Add Immigration as an interest to stay up to date on the latest Immigration news, video, and analysis from ABC News.

In a 218-page motion filed Tuesday in U.S. District Court in Southern California, ACLU attorneys contend the administration has removed numerous children, including babies, from their mothers and fathers based on offenses as minor as traffic violations and misdemeanor charges dating back more than two decades.

"The government is systematically separating large numbers of families based on minor criminal history, highly dubious allegations of unfitness, and errors in identifying bona fide parent-child relationships," the ACLU's motion reads. "Hundreds of children, some literally just babies, are being irreparably damaged because their parent may have committed a minor offense in the past, even a traffic offense."

Paul Ratje/AFP/Getty Images, FILE

Jose, 27, with his son Jose Daniel, 6, is searched by US Customs and Border Protection Agent Frank Pino, May 16, 2019, in El Paso, Texas.

In June 2018, Judge Dana Sabraw of the U.S. District Court in San Diego issued a preliminary injunction that was supposed to halt most instances of migrant parents and children being separated after crossing the border from Mexico and being detained and prosecuted under the Trump administration's "zero tolerance" policy.

Sabraw stated that his ruling was meant to "expedite the immediate reunification of the bulk of the separated families."

But the ACLU claims the order left a loophole by allowing the government to continue separating children from parents who are found unfit or have criminal histories.

Since the injunction did not specifically spell out what it meant by "criminal history," the government, according to the ACLU motion, is using "any criminal history, no matter how minor" to separate parents and children.

“The administration must not be allowed to circumvent the court order over infractions like minor traffic violations,” Lee Gelernt, the ACLU attorney who filed the motion, said in a statement.

Gelernt called the Trump administration's practice a "cruel and illegal policy."

A spokesperson for the U.S. Customs and Border Protection (CBP) and the Department of Homeland Security declined to comment, citing the ongoing litigation.

Mark Morgan, the newly-appointed acting CBP chief, testified at the Senate Homeland Security Committee on Tuesday, saying, "The demonizing of law enforcement professionals must stop."

Morgan slammed reports from a recent fact-finding trip to the Southern border by House Democrats as "simply not true."

"The men and women of the CBP are not running concentration camps, making those in custody drink from toilets, nor denying them access to toothbrushes," Morgan said, referring to allegations made by the House Democrats who journeyed to the border. "It's unjust and does nothing to bring us closer to resolving one of the most divisive issues that we face in our country."

In the motion, the ACLU attorneys asked the court to hold a hearing "as soon as practicable," saying the situation at the border has "reached a critical juncture."

The ACLU attorneys asked the court to make clear that the Trump administration "may not separate based on criminal history regardless of the severity of that history" nor can it separate families without a concrete assessment of a parent's fitness.

The ACLU's motion contends that from June 28, 2018, the day Sabraw issued the preliminary injunction, through June 29, 2019, the government separated 911 children, including babies and toddlers, from their parents. The group claims the average age of all separated children is 9.

Among the parents separated from their children, according to the ACLU motion, were:

-- Six parents convicted of marijuana possession.

-- One parent convicted of shoplifting and driving without a license.

-- A parent convicted on a "false police report" in a hit-and-run case 26 years ago.

-- A father convicted of "malicious destruction" of $5 worth of property.

The ACLU, according to its motion, also found that a father was separated from his three young daughters because he was diagnosed with HIV.

The government "did not explain why they believe an HIV diagnosis rendered the father dangerous to his own children," the motion reads.

In another case, a mother who broke her leg crossing the border had her child taken away while she was being treated in a hospital, according to the motion. The mother and child remained separated for 79 days until her lawyer filed a motion demanding the child's release, the motion says.

The motion also claimed that a 3-year-old girl was taken from her father because CBP agents did not believe they were related even though the father's name was on the child's birth certificate and he presented other supporting documents and took a DNA test to confirm paternity. Meanwhile, the daughter was sexually abused while in the government's care "and appears to be severely regressing in development," according to the motion.

Astrid Dominquez, director of the ACLU's Border Rights Center, told ABC News on Wednesday that the CBD is maintaining a policy of "cruelty" to discourage migrants from crossing the border.

"But these are asylum seekers," Dominquez said. "What Border Patrol is not doing is trying their best to process people and treat people in a humane way."