The lawsuit was filed in San Francisco on behalf of three teenagers recently detained on Long Island, just east of New York. An ACLU lawyer says the lawsuit was filed there because the teenagers were taken to a government facility in northern California.
The lawsuit is seeking class action status to determine the national scope of the detention program and the number of teenagers who may be affected.
William S. Freeman, senior staff attorney for the ACLU of Northern California, said the suit charges the Department of Health and Human Services' Office of Refugee Resettlement with accepting unsubstantiated gang allegations made by Immigration and Customs Enforcement. The suit said the children were placed in severely restrictive conditions based on the allegations.
Freeman said the children had previously been screened by the Office of Refugee Resettlement and placed with their parents on Long Island after entering the country illegally from Central America.
"They have dreams and legal claims to remain in the United States, but they've been swept up by an administration that prioritizes deportations over truth and justice," he said.
The defendants in the lawsuit include President Donald Trump's attorney general, Jeff Sessions; Immigration and Customs Enforcement and the Office of Refugee Resettlement.
Devin O'Malley, a spokesman for the Department of Justice, defended the detentions.
O'Malley said Sessions visited El Salvador and heard of efforts by transnational gangs to recruit children as young as 8 years old.
"We will absolutely defend the President's lawful authority to keep Americans safe and protect communities from gang violence," O'Malley said.
Last month, the New York Civil Liberties Union claimed at least nine teenagers from Long Island have been sent to U.S. immigration detention facilities after being falsely labeled as gang members. Freeman said he did not know whether the three plaintiffs his organization represents are among those nine.
Police on Long Island have been sweeping up dozens of people suspected of being MS-13 gang members in the past year following the deaths of 17 people in possible gang violence in Suffolk County. Trump, a Republican, visited the area last month, vowing a crackdown on the gangs.
"They kidnap. They extort. They rape, and they rob. ... They shouldn't be here," Trump told a gathering of law enforcement officers in Brentwood, the community at the epicenter of the violence.
Some attorneys have claimed their clients have been unfairly caught up in the police crackdown and labeled as gang members or affiliates and then subjected to immigration detention.
Suffolk County police Commissioner Timothy Sini told The New York Times there were times when officers couldn't make criminal arrests so officers work with federal immigration officials to target known gang members "for violation of civil immigration laws, which is another way to remove dangerous individuals from our streets."
Children who enter the U.S. illegally unaccompanied by their parents are treated differently under U.S. law. They aren't immediately deported if caught at the border, like adults, and can be placed with relatives in the U.S. while they undergo a lengthy vetting process.
Long Island is among the leading destinations nationally for the children because of its large Hispanic population. More than 4,000 have been placed there in the past three years.