(CNN) A federal judge in Seattle on Friday declined to release from detention a 23-year-old immigrant who had been protected from deportation under Obama-era rules.

Magistrate Judge James Donohue set a February 24 bond hearing for Daniel Ramirez Medina, thereby extending for a week a case that has roiled pro-immigration groups.

Ramirez is originally from Mexico and had twice been granted deferred action and employment authorization under the Deferred Action for Childhood Arrivals, or DACA , his lawyers said. The program, created by President Barack Obama's executive order in 2012, is meant to shield qualified individuals from deportation.

Ramirez was detained by US immigration officials in Washington state last week. Immigration and Customs Enforcement officials said Medina had admitted to being a gang member, while his attorneys denied that accusation and said he was not a threat to public safety.

"There is no basis for detaining our client," defense attorney Theodore Boutrous said in a press conference after the hearing. "It is outrageous."

The case raises questions about what it could mean for Dreamers, undocumented immigrants who were brought to the United States as children. Ramirez came to the United States when he was 7 years old and became a DACA recipient in 2014 and renewed in 2016, according to court papers filed by his attorneys.

Immigration rights groups say they believe this may be the first time a Dreamer has been arrested without cause.

Ramirez's lawyers have filed suit in federal court saying their client is being unlawfully held by US Immigration and Customs Enforcement officials.

"The federal government may not arbitrarily or capriciously deprive DACA recipients of these benefits, as they have here with Mr. Ramirez," his lawyers wrote in briefs filed in court.

Differing accounts of Ramirez's history

The government and Ramirez's lawyers have presented very different depictions of him.

His attorneys argue Ramirez is being "presently detained without justification" and that he presents "no threat to national security or public safety."

An ICE spokesperson offered a different account.

ICE said Ramirez was taken into custody "based on his admitted gang affiliation and risk to public safety."

Rose Richeson, an ICE spokesperson, said, "Mr. Ramirez -- a self-admitted gang member -- was encountered at a residence in Des Moines, Washington, during an operation targeting a prior-deported felon. He was arrested February 10 by US Immigration and Customs Enforcement and transferred to the Northwest Detention Center to await the outcome of removal proceedings before an immigration judge with the Department of Justice's Executive Office for Immigration Review."

Mark Rosenbaum, counsel for Ramirez, disputed the ICE's characterization in a statement: "Mr. Ramirez unequivocally denies being in a gang. While in custody, he was repeatedly pressured by US Immigration and Customs Enforcement agents to falsely admit affiliation. The statement issued tonight by Ms. Richeson of US Immigration and Customs Enforcement is inaccurate."

The conflicting stories come amid immigrant rights attorneys' fears that President Donald Trump's administration will target the Dreamers, who were temporarily allowed to live and work in the United States after passing background checks. About 750,000 people have received permission to stay under DACA.

The arrest

ICE agents arrived last Friday morning at Ramirez's father's house, according to the court papers filed by Ramirez's attorney. The agents had an arrest warrant for the father. The court papers allege that ICE officials asked whether Ramirez was in the state legally and he responded that he was.

On the advice of his brother, who also is a DACA recipient, Ramirez declined to answer more questions.

ICE agents took Ramirez to a Seattle processing center where he told them that he had a work permit. Ramirez was told by one of the ICE agents, "It doesn't matter, because you weren't born in this country," according to the lawsuit.

Ramirez remains in ICE's custody in Tacoma, according to court documents filed by his lawyers.

Ramirez had moved from California to Washington in May. He moved with his 3-year-old son to join his father in search of better economic opportunities, according to his lawyers.

ICE said that Ramirez was arrested in Des Moines, Washington, a suburb south of Seattle. His lawyers' court filing states the arrest happened in Seattle.

In response to the case, Seattle's mayor Ed Murray and City Councilmember M. Lorena González, reiterated its sanctuary city policy.

"The Seattle Police Department will not help ICE detain or deport immigrants who are doing nothing more than raising their families and contributing to the vibrant culture and successful economy of our city," according to their joint statement.

They're also requesting details of the arrest from Seattle's local ICE office.

I join @CMLGonzalez in seeking answers about the arrest of a Dreamer in our city. Uncertainty only creates more fear https://t.co/TLw7TJDhNQ pic.twitter.com/XphztAq81N — Ed Murray (@MayorEdMurray) February 15, 2017

Outcry over detainment

A small group of demonstrators gathered in Tacoma demanding Ramirez's release Tuesday.

House Minority Leader Nancy Pelosi said in a statement: "We should not be wasting resources on deporting law-abiding and contributing members of our communities. Dreamers represent the best of America. We must get to the bottom of this so that it doesn't happen again."

Washington Sen. Maria Cantwell pledged to looking "into this troubling situation."