One late spring evening in 2017, a 16-year-old boy was riding a bike with friends in Brentwood, New York—where he lived with his mother—when Suffolk County police officers arrested and handcuffed him.

The boy, a citizen of Honduras, was seized under an Immigration and Customs Enforcement (ICE) warrant, accused of being a gang member, and quickly transferred to ICE custody. He was able to call his mother just before he was put on a plane to Washington state, where he was put in a secure shelter run by the Department of Health and Human Services.

The problem? According to a federal judge, there’s no evidence he was a member of a gang.

Immigrant rights advocates say the boy, identified only as EHE in court documents, is part of a growing number of people with no ties to gangs caught in a dragnet created by President Donald Trump’s anti-gang efforts, policies that he will talk up in an appearance on Long Island Wednesday.

Meanwhile, EHE has been released after a federal judge ruled the feds had no hard evidence to hold him.

The boy’s arrest on May 30 was just the beginning of a year-long, cross-country process that has left his lawyers fighting for his right to stay in the U.S. His status is currently being fought over in immigration court; ICE is trying to deport him, and his attorneys are looking to keep that from happening.

About a week after EHE was put on a plane across the country, officials moved him to another facility in California. Two months after that, they flew him back to New York to put him in another secure facility.

This was all because ICE concluded that the boy was gang-affiliated based largely on who he was with and how he looked. But, according to District Judge John Keenan, as first reported by the Long Island publication Newsday, those observations were not enough to justify taking a teenager away from his mother for almost a year.

“At the time of EHE’s arrest, it appears that the only evidence of his involvement with any gang is SCPD’s self-serving observations that his ‘[c]lothing and accessories are indicative of membership in MS-13’ and that he was ‘[r]egularly found associating with confirmed MS-13 gang members,’” the judge wrote in a ruling issued earlier this month.

“EHE’s choices of wardrobe and associates do not constitute criminal offenses,” the judge continued,“and EHE has not been charged with one. The complete absence of hard evidence of EHE’s affiliation with MS-13 or any other gang generates the inference that EHE’s arrest was merely a pretext for placing him in detention.”

Not to mention, the judge added, the boy had never been arrested before he was shipped to Washington state.

Advocates say cases like this one are increasingly common, as ICE works overtime to arrest and deport alleged gang members.

“Usually when I’m in court, I make references to Joe McCarthy,” said Rob Robertson, an immigration lawyer from northern Virginia.

He said ICE has tried to use teens’ broader social affiliations as grounds for alleging they are gang-affiliated and trying to deport them. For teens with broad social groups, this can be perilous.

“If one of the friends is gang-affiliated then all of them will get labeled gang-affiliated,” Robertson said. “They say, Kid A was observed with Kids XYZ, Kids XYZ are convicted of gang activity, therefore Kid A is a gang member. Or it could be clothing. It could be anything. If he’s wearing too much blue he’s a gang member. They’re looking for anything.”

A spokesperson for ICE sent The Daily Beast a list of criteria they use to determine if someone is in a gang.

“Our agents and officers use an established criteria to determine if someone is a gang member or gang associate,” spokesperson Matthew Bourke said. “Additionally, we would note in a case file whether an individual has been validated as a gang member by a local jurisdiction.”

The criteria Bourke sent The Daily Beast includes:

Subject has tattoos symbolizing or identifying a specific gang; Subject frequents an area notorious for gangs and/or associates with known gang members; Subject has been seen displaying gang signs/symbols; Subject has been identified as a gang member by a reliable source; Subject has been arrested with other gang members on two or more occasions; Subject has been identified as a gang member by jail or prison authorities; Subject has been identified as a gang member through seized or otherwise lawfully obtained written or electronic correspondence; Subject has been seen wearing gang apparel or been found possessing gang paraphernalia.

The ICE spokesperson said people who meet two of those criteria are considered gang members.

Anthony Posada of The Legal Aid Society—the organization which helped reunite EHE with his mother—said ICE generally appears to rely on local police departments to determine if someone is gang-affiliated. In New York City, he added, this can cause significant challenges for immigrants. The New York Police Department keeps a secret list of potential gang members. People don’t know if they’re on the list and don’t have a way to get off of it.

“It doesn’t require you to have committed any wrongdoing to be entered on it and there’s no way to get off of it,” Posada said.

And just being labeled as gang-affiliated can be grounds to start the deportation process, he added.

“A lot of them are detained, held in detention facilities, and then summarily processed and deported on these very same allegations,” he said.