Updated

A federal court judge has issued a preliminary injunction against Immigration and Customs Enforcement's policy of detaining Central American mothers and children seeking asylum in the U.S.

The American Civil Liberties Union, which filed the case, claimed the detentions were part of a strategy to deter other asylum-seekers from coming to the U.S.

In granting the injunction, Judge James Boasberg of the U.S. District Court for the District of Columbia wrote that the Obama administration's "current policy of considering deterrence is likely unlawful, and ... causes irreparable harm to mothers and children seeking asylum."

Judy Rabinovitz, deputy director of the ACLU's Immigrants' Rights Project, said, ""The court held that it was illegal to detain families based on deterrence. It made clear that the government cannot deprive individuals of their liberty merely to send a message to others."

Proponents of taking tough action on the influx of Central Americans -- many of them unaccompanied minors -- who came over the border last year said that a weak U.S. response would encourage more illegal immigration.

In a statement about the court's Friday move, the ACLU said it had filed the case "on behalf of mothers and children who have fled extreme violence, death threats, rape, and persecution in Central America and come to the U.S. for safety."

"In rejecting the U.S. government's argument that detention of the women and children was necessary to prevent a mass influx that would threaten national security," the ACLU said, "the court wrote that the 'incantation of the magic word 'national security' without further substantiation is simply not enough to justify significant deprivations of liberty.'"

The Associated Press contributed to this report.

Follow us on twitter.com/foxnewslatino
Like us at facebook.com/foxnewslatino