A former Mexican police officer turned drug trafficker who acted as a U.S. government informant was released late Thursday after being held in detention for nearly six years, The Associated Press reports.

Guillermo Ramirez-Peyro, known by the nickname “Lalo,” had been held for years in solitary confinement, most recently at a federal immigration detention center near Buffalo, N.Y.

After years of legal wrangling, an immigration appeals board last month suspended efforts to deport Ramirez back to Mexico. The board, echoing an 8th U.S. Circuit Court of Appeals decision, cited the likelihood that he would be tortured or murdered by drug gangs or corrupt police officers in their employ if returned to his native country.

Ramirez could still face deportation once the violence subsides and safer conditions prevail in Mexico.

The informant worked for several years for the U.S. Immigration and Customs Enforcement agency, and helped law enforcement prosecute more than 50 drug traffickers. He also allegedly participated in or witnessed several killings in Juarez, though he has denied killing anyone himself.

Andrew Becker is a reporter for Reveal, covering border, national and homeland security issues, as well as weapons and gun trafficking. He has focused on waste, fraud and abuse – with stories ranging from border corruption to the expanding use of drones and unmanned aerial vehicles, from the militarization of police to the intersection of politics and policy related to immigration, from terrorism to drug trafficking. Becker's reporting has appeared in The Washington Post, the Los Angeles Times, The New York Times, Newsweek/The Daily Beast and on National Public Radio and PBS/FRONTLINE, among others. He received a master's degree in journalism from UC Berkeley. Becker is based in Reveal's Emeryville, California, office.