While his defense attorneys and government lawyers contested claims about unconstitutional detention and doctored evidence in court this morning, Ramirez Medina’s case sheds light on ICE’s broad criteria for identifying gang members, which dates from George W. Bush’s presidency and has been used to deport thousands of individuals — including DACA recipients — over the past decade.

ICE claims Ramirez Medina’s DACA status is null and void due to evidence of gang involvement outlined by government attorneys in a brief filed earlier this week. The sum of the evidence is a tattoo on his arm that immigration officials believe is gang related, and statements that he allegedly made in custody that “he used to hang out with the Sureno[s] in California,” that he “fled California to escape the gangs,” and that he “still hangs out with the Paizas in Washington State.”

The former California resident, who recently moved north to Des Moines, Washington, was detained on Friday when ICE went to his family’s home looking for his father, who is also undocumented and in removal proceedings.

Of the more than 680 people swept up during last week’s nationwide raids by Immigrations and Customs Enforcement, none has attracted more attention than 23-year-old Daniel Ramirez Medina. Although he crossed into the United States illegally when he was a child, Ramirez Medina twice applied successfully for permission to stay in the country under the Obama Administration’s Deferred Action for Childhood Arrivals (DACA) Program.

The Intercept obtained the guidelines on gang classification and documentation through a Freedom of Information Act lawsuit for records related to the agency’s ICEGangs database. The policy, which is titled “ICEGangs Database: Data Entry and Use,” was issued on August 4, 2006, and establishes guidelines for how to use and share information from gang databases in states like California and Washington.

Most importantly, the guidelines codify the criteria for documenting individuals as gang-affiliated, which makes them a higher priority for deportation, even if like Ramirez Medina they have not been convicted of a crime.

According to the directive, gang affiliation is determined by a federal gang crime conviction, or a civil ruling (such as a gang injunctions) at state or federal level that deals with gang activity or association. Individuals can also be classified as gang members if they admit to gang ties during “any questioning by law enforcement,” whether during a street stop or during a jail classification interview.

Also included is a list of ten additional criteria, of which only two are required for entering an individual into the ICEGangs database:

“Subject has tattoos identifying a specific gang.”

“Subject frequents an area notorious for gangs and/or associates with known gang members.”

“Subject been seen displaying gang signs/symbols.”

“Subject has been identified as a gang member through a reliable source.”

“Subject has been identified as a gang member through an untested informant.”

“Subject has been arrested in the company of other gang members on two or more occasions.”

“Subject has been identified as a gang member by a jail or prison.”

“Subject has been identified as a gang member through seized or otherwise obtained written or electronic correspondence.”

“Subject has been seen wearing distinctive gang style clothing or has been found in possession of other gang indicia.”

“Subject has been identified as a gang member through documented reasonable suspicion.”

Gang documentation is a unilateral designation by law enforcement and is extremely difficult to challenge in criminal court, where defendants are entitled to a court-appointed attorney. Challenging gang classification by law enforcement is more difficult during deportation proceedings because defendants cannot compel the government to disclose the evidence against them as they can in criminal court. Many people in immigration court also cannot afford to hire private attorneys, and face the evidence laid out against them by the government without a lawyer.

Furthermore, the use of potentially dubious sources of information, such as “untested informants,” “reliable sources,” or “reasonable suspicion,” (the lowest legal standard for law enforcement to stop and question someone), highlight the critiques of gang documentation that have been made for years on a state level. The most prominent example is in California, where state lawmakers required more transparency and due process for people accused of gang ties.

A report on gang documentation issued last year by the Immigrant Rights Clinic at University of California–Irvine’s School of Law highlighted how difficult it is to legally challenge questionable evidence of gang involvement, and the immigration consequences of gang classification.

“Allegations of gang membership are particularly problematic for undocumented immigrants who would otherwise have a strong case for prosecutorial discretion,” the report reads, pointing to the possible denial of immigration relief under DACA, crime victim visas, or unaccompanied minor petitions.

Sean Garcia-Leys, an attorney with the Urban Peace Institute in Los Angeles who helped research and write the UC-Irvine study, said the situation of Ramirez Medina was a classic case of why gang documentation procedures must be reformed.

“Gang allegations should never be used to determine government action unless there has been an adversarial process in front of a neutral decision-maker who decides that person is a gang member,” Garcia-Leys told The Intercept. “Gang affiliation should never be a one sided determination, there’s too high a risk of error.”

In court this morning, Rosenbaum claimed the defense team had not seen “a single piece of evidence” proving gang affiliation, adding that ICE had not provided any information from its gang database on Ramirez Medina.

However, ICE’s own policy for gang documentation explicitly instructs ICE to keep all mention of gang databases or gang intelligence collection out of court documents.

“All information accessed through ICEGangs (ICE or third agency) is to be treated as law enforcement intelligence and not to be disclosed or used as evidence in any criminal, civil, or administrative proceeding, nor is it to be used independently as probable cause to support arrests, searches, seizures, or other law enforcement actions,” the policy directive reads.

“What began, I thought, as a mistake in bringing Daniel in has turned into a bogus operation that is attempting to railroad him and violate the sacred program that the DACA represents,” attorney Mark Rosenbaum said in a conference call with reporters on Thursday evening. “It is one of the most serious examples of governmental misconduct that I have come across in my 40 years of practice.”