Last Updated Mar 28, 2017 9:43 PM EDT

SEATTLE -- A Mexican man who has spent more than six weeks in immigration detention despite his participation in a program designed to protect those brought to the U.S. illegally as children can be released from custody pending his deportation proceedings, an immigration judge ruled Tuesday.

Lawyers for Daniel Ramirez Medina, 24, told The Associated Press they expect him to be released as soon as Wednesday following the decision by Judge John Odell in Tacoma.

Ramirez spent 40 minutes answering questions from prosecutors during a two-hour hearing Tuesday, and he repeatedly and credibly denied having any connections with gangs, attorney Mark Rosenbaum said.

“He answered every question the government put to him,” Rosenbaum said. “He stayed true, and the government had no evidence whatsoever.”

Rosenbaum added: “We’re thrilled he’s getting out of a facility he never should have been in in the first place. But he’s lost 45 days of his life. He’s been vilified by the government.”

Rose Richeson, a spokeswoman for U.S. Immigration and Customs Enforcement, did not immediately return an email seeking comment.

Immigration agents arrested Ramirez on Feb. 10 at a suburban Seattle apartment complex where they had gone to arrest his father, a previously deported felon. Agents said Ramirez, who came to the U.S. at age 7, acknowledged affiliating with gangs. He adamantly denies any gang ties or making any such admission.

Ramirez has no criminal record and twice passed background checks to participate in the Deferred Action for Childhood Arrivals program, which allows young people brought to the U.S. illegally as children to stay in the country and work. Immigration officials revoked that status following his arrest and began deportation proceedings against him.

http://www.cbsnews.com/news/daniel-r...o-be-released/