Civil rights attorneys have filed a class action lawsuit against the Obama administration aimed at ending the detention of thousands of undocumented mothers and children on the southern border who have applied for asylum in the United States.

Attorneys for the American Civil Liberties Union filed the federal class action suit Tuesday, accusing the Obama administration of multiple violations of immigration and asylum laws, as well as the fifth amendment of the constitution.

"Locking up families and depriving them of their liberty in order to scare others from seeking refuge in the U.S. is inhumane and illegal," the ACLU's Judy Rabinovitz said in a statement.

As part of the White House's response to the unprecedented flood of undocumented children that hit the southern border this year, the Department of Homeland Security instituted a policy of keeping mothers and their children in detention centers during the asylum process. The new policy was designed, in part, to act as a deterrent to future immigrants.

Human rights activists have harshly criticized the program, claiming the conditions at the detention centers, many of which were hastily put together this summer to respond to the immigration flood, and arguing the administration has violated asylum seeker's right to due process.

Activists have also complained that the centers, which are typically located in remote areas, have made the asylum process more difficult for applicants, since there are few qualified attorneys and DHS has increasingly used unreliable remote hearing technology to process cases.

"The government should not be using these mothers and their children as pawns. They have already been through devastating experiences, and imprisoning them for weeks or months while they await their asylum hearings is unnecessary and traumatizing," Rabinovitz added.