Updated

A teenage immigrant from El Salvador is back with his family in New York after being detained for five months for suspected gang ties, American Civil Liberties Union lawyers said Wednesday.

The 17-year-old was released Tuesday and is with his family in Brentwood, on Long Island, the ACLU said.

The teenager was arrested for suspected gang ties earlier this year. His release comes after a federal judge in California ruled Monday that he and other youths who had been detained in a gang crackdown must get prompt hearings about their alleged gang ties.

Civil liberties lawyers sued President Donald Trump's administration on behalf of the detained teenagers in August.

The ACLU did not identify the teen released Tuesday.

Lawyers for the civil liberties group's northern California chapter, which spearheaded the lawsuit, said the teenager left El Salvador because of death threats from gangs there. They said there is no evidence that the teen was himself involved with a gang.

The teenager is applying for lawful immigration status, the group said.