Immigrants in the United States illegally are not automatically eligible for asylum on the basis that they are former gang members who risk persecution if they return home, a federal appeals court panel ruled Wednesday.

Three judges from the 9th U.S. Circuit Court of Appeals upheld federal immigration standards that exclude former gang members from social groups that can clearly qualify for protection.

The ruling could affect thousands of immigrants who are fleeing gang-related violence in Central America, immigration experts said.

"We have so many asylum seekers form Central America, and we have a lot of people who are forced to join gangs," said Fatma Marouf, a professor at Texas A&M University School of Law who wrote a brief in the case.

The ruling came in a deportation proceeding against a man from El Salvador, Wilfredo Garay Reyes, who left a gang in his home country and entered the United States illegally in 2001 at the age of 18, after being shot in the leg by a gang leader upset about his defection. Garay sought to stay in the United States under a law that prevents U.S. authorities from sending immigrants to countries where their lives would be threatened because of their race, religion, nationality, membership in a particular social group, or political opinion.

Garay argued that former members of his El Salvador gang constituted a "particular social group," and the gang members would kill him if he returned to El Salvador — possibly by placing a gasoline-filled tire around him and burning it, a method they prefer, he said.

Immigration officials rejected Reyes' claim on the grounds that former gang members do not constitute a particular social group.

The Board of Immigration Appeals said to qualify as a particular social group, there must be evidence showing that society "perceives, considers, or recognizes persons sharing the particular characteristic to be a group."

Garay's proposed group — members of the Mara 18 gang in El Salvador who have renounced their gang ties — was too broad, and there was little evidence society recognized them as a distinct group, the board said. The appeals court panel upheld the decision.

While holding that Garay did not automatically qualify to stay in the country, the 9th Circuit resurrected his attempt to avoid deportation under a separate law related to torture. The panel said an immigration judge and the Board of Immigration Appeals were wrong to discount his concerns about being tortured upon his return; the immigration judge's decision even suggested that Garay failed to show he might be tortured, but only killed.

"We cannot read the (immigration judge's) statement as reflecting anything other than an erroneous view that killings are not torture," Judge Consuelo M. Callahan wrote for the panel. She said the case should be sent back to an immigration judge to assess "whether Garay demonstrated a probability that he would be killed or otherwise tortured."

Garay's attorney, Alma David, praised the ruling. "It's a strong, good decision in that there's now a strong likelihood of being granted relief under the Convention Against Torture," David said.