Detained: Daniel Ramirez-Medina, 23, was arrested last week in Seattle by US Immigration agents who were there to take his father

A federal magistrate has declined to immediately release a man arrested by immigration agents last week despite his participation in a federal program to protect those brought to the U.S. illegally.

Magistrate Judge James P. Donohue said in U.S. District Court in Seattle on Friday that Daniel Ramirez-Medina, 23, must request a bond hearing from a federal immigration judge and that the hearing should take place within a week.

While Donohue deferred to the immigration judge on the custody issue, he said the case would return to his court on the issue of whether the federal court has jurisdiction to hear Ramirez's claims that his detention violated his rights.

Ramirez-Medina, who has been in the US since he was 16, was arrested last week in his suburban Seattle home by US Immigration and Customs Enforcement (ICE) agents who were there to take his father.

He has a job, a young son, no criminal record and protection under Obama's Deferred Action for Childhood Arrivals (DACA) program - referred to as 'Dreamers' - according to his lawyers.

However, according to a court filing by his lawyers last Monday, the agents told him that even though he was a DACA recipient 'he would be arrested, detained, and deported anyway, because he was not 'born in this country'.'

Ramirez-Medina challenged his detention saying that his Fourth Amendment Rights had been violated.

Scroll down for video

Raids: Seattle ICE officers (some pictured in Atlanta on Thursday) allegedly pressured him to admit to being in a gang. His lawyers say he is not a criminal, and has a job and young son

'We're hopeful the immigration judge will recognize there's no reason to keep Mr. Ramirez,' Theodore Boutrous, one of his attorneys said outside the courthouse after Friday's hearing.

He is being held at a federal detention center in Tacoma and did not appear in the courtroom.

Promise: Donald Trump has promised to deport 'millions' of illegal immigrants. He has said he wants his raids to focus on people who have committed crimes

His attorneys said the bond hearing will only deal with the question of his immediate release. They said they eventually want to get the court to develop standards to protect others under the DACA program.

Some saw his arrest last week as the opening salvo in an attack on former President Barack Obama's DACA program, while federal authorities suggested it was simply a routine exercise of their authority.

DACA recipients were termed 'dreamers' by the Obama administration.

Dozens of people demonstrated in his support outside the courthouse before and after Friday's hearing. Some held signs that said 'Free Daniel,' or 'No Deportations: Not 1 More.'

Court documents filed by the government said Ramirez-Medina admitted to having gang ties when questioned by an immigration agent.

His lawyers called the allegation false and said the federal government has failed to show proof of that statement.

The court documents also said Ramirez-Medina had a 'gang tattoo' on his forearm, but Rosenbaum said the agents misidentified it.

Dreamer: Ramirez-Medina was one of Barack Obama's dreamers, protected by DACA (Deferred Action for Childhood Arrivals) act. No other DACA person has yet been arrested

He said it reads 'La Paz BCS.' La Paz means 'Peace' in Spanish and is also the capital of the Mexican state of Baja California Sur where Ramirez was born.

He worked on farms picking fruit in California before moving to Washington, and he twice passed background checks to participate in the DACA program- most recently last spring.

Immigration agents found him earlier this month when they went to an apartment complex in the Seattle suburb of Des Moines to arrest his father, identified as Antonio Ramirez-Polendo.

Ramirez-Polendo was deported eight times between 2000 and 2006, U.S. Immigration and Customs Enforcement said Thursday, and he served a year in prison in Washington state for felony drug trafficking.

The DACA program - referred to as 'Dreamers' by supporters and derided as 'illegal amnesty' by critics - has protected about 750,000 immigrants since its inception in 2012. It allows young people who were brought into the country illegally as children to stay and obtain work permits.