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, referred a request for comment to the Executive Office for Immigration Review, which did not immediately return an email seeking comment Monday night.

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.

His attorneys have pressed claims in federal court that the arrest and detention violated Ramirez's constitutional rights, but a federal judge in Seattle last week upheld a decision not to release him, saying he instead should challenge his detention in immigration court.

U.S. District Judge Ricardo S. Martinez nevertheless said "many questions remain regarding the appropriateness of the government's conduct" in arresting him.

Among those questions, his lawyers have said, is whether U.S. Immigration and Customs Enforcement agents misinterpreted a tattoo on his forearm when they described it as a "gang tattoo" in an arrest report. The lawyers say the tattoo, which says "La Paz BCS," pays homage to the city of La Paz in the Mexican state of Baja California Sur, where he was born.

Ramirez's case is one of several recent arrests that have left immigration activists fearing an erosion of protections under the DACA program instituted by President Barack Obama in 2012.

ICE agents in Portland, Oregon, on Sunday arrested Francisco J. Rodriguez Dominguez, a DACA participant who was brought to the U.S. from Morelia, in Mexico's Michoacan state, at age 5. Last December, he entered a diversion program following a drunken driving arrest and had attended all his court dates and required meetings, the American Civil Liberties Union of Oregon said in a statement.

The agency said Monday that it targeted Rodriguez Dominguez because of the DUI and that he would be released on bond pending deportation proceedings.

Ramirez's lawyers had sought to keep his case out of federal immigration court, which they said is ill-equipped to handle his claims that his arrest violated his constitutional rights to due process and to be free from unreasonable seizure.

The immigration judge set his bond at $15,000, which his lawyers say will be posted.

About 750,000 immigrants have enrolled in the DACA program since it began.