Updated

Attorneys general from 17 states and the District of Columbia sued the Trump administration Tuesday over its policy of separating families who cross the U.S-Mexico border illegally.

The lawsuit, filed in federal court in Seattle, is the first legal challenge by states over the practice.

The states which joined the lawsuit are California, Delaware, Illinois, Iowa, Maryland, Massachusetts, Minnesota, New Jersey, New Mexico, New York, North Carolina, Oregon, Pennsylvania, Rhode Island, Vermont, Virginia and Washington. All have Democratic attorneys general.

"The administration's practice of separating families is cruel, plain and simple," New Jersey Attorney General Gurbir Grewal said in an emailed statement. "Every day, it seems like the administration is issuing new, contradictory policies and relying on new, contradictory justifications. But we can't forget: the lives of real people hang in the balance."

Trump signed an executive order last week that was designed to end the separations under his "zero tolerance" policy, which prosecutes all adults who come to the U.S. illegally.

However, the lawsuit claims the order is riddled with caveats and fails to reunite parents and children who have already been torn apart. They accuse the administration of denying the parents and children due process; denying the immigrants, many of whom are fleeing gang violence in Central America, their right to seek asylum; and being arbitrary in applying the policy.

Over the weekend, the Trump administration said that 2,053 separated minors were being kept in facilities run by the Department of Health and Human Services as of June 20. A fact sheet released by the administration said that 522 separated children had been reunited with parents or guardians.

A U.S. judge in San Diego already is considering whether to issue a nationwide injunction sought by the American Civil Liberties Union that would order the administration to reunite the separated children with their parents.

A Seattle-based immigrant rights group sued Monday on behalf of detained asylum-seekers in Washington state who have been separated from their children.

Fox News' Bill Mears and The Associated Press contributed to this report.