Seattle (CNN) Lawyers for a Mexican immigrant facing deportation proceedings despite having been allowed to remain in the country under an Obama-era program are disputing key aspects of the case against him -- including by denying he ever confessed to being a gang member.

Daniel Ramirez Medina, a 23-year-old man who authorities say came to the United States with his parents illegally when he was 7, was arrested last week in Washington state during a raid that initially targeted his father.

Ramirez had twice been granted deferred action and employment authorization under the Deferred Action for Childhood Arrivals, or DACA, his lawyers said. The program, meant for "Dreamers" -- undocumented immigrants younger than 30 who were brought to the United States as children and pass background checks -- temporarily allows recipients to live and work in the country.

The government alleges Ramirez told immigration agents he is a gang member, an affiliation that generally disqualifies undocumented immigrants from gaining DACA protection.

But Ramirez's lawyers filed a lawsuit in federal court, saying he is not a gang member and that immigration agents never had any legal cause to take him to a holding facility where was alleged to have made the disputed confession.

Here are the conflicting accounts:

The government's account

The government says ICE agents arrived at the home of Ramirez's father in Des Moines, Washington, a suburb south of Seattle, the morning of February 10. The agents had an arrest warrant for the father, who authorities say is a previously deported felon.

While the agents were in the the home, the father indicated Ramirez was in the country illegally and gave the agents permission to enter his apartment, according to court documents filed by the government. Ramirez was there, and when the agents talked to him, he acknowledged that he was born in Mexico, was in the United States illegally and had previously been arrested, the government's filing says.

The agents took Ramirez to an ICE holding facility, where an ICE officer asked him whether he was involved in gang activity. "Not no more," Ramirez allegedly replied, according to the government's filing.

"(Ramirez) was then questioned further regarding a 'gang tattoo' on his forearm, to which he responded that he 'used to hang out with the Surenos in California,' that he 'fled California to escape from the gangs,' and that he 'still hangs out with the Paizas in Washington state,'" the government's filing says.

JUST WATCHED Trump: New immigration order will be tailored Replay More Videos ... MUST WATCH Trump: New immigration order will be tailored 01:31

The government says it transferred him to a detention center in Tacoma and issued him a "notice to appear" at immigration removal proceedings. His DACA status was automatically terminated when the notice was issued, the government says.

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

The Department of Homeland Security said Wednesday that about 1,500 recipients have had their deferred action terminated because of a criminal conviction, gang affiliation, or a criminal conviction related to gang affiliation. They department claims Ramirez is a gang member.

What Ramirez says happened

The discrepancies start with the ICE agents' arrival at the apartment of Ramirez's father, where Ramirez also lives. ICE officials entered the apartment without the father's consent, according to court documents filed by Ramirez's attorneys.

The agents asked Ramirez where he was born, and when he said he was born in Mexico, the agents placed him in handcuffs, his lawyers say.

"Mr. Ramirez stated multiple times to the ICE agents that he had a legal work permit, but despite this knowledge, the agents refused to release him," Ramirez's lawyers say in one of their court filings.

Ramirez's attorneys contend he was detained illegally, arguing that the agents held him "solely because he was in the country illegally and had been arrested for speeding -- neither of which would justify detaining or starting removal proceedings for a DACA recipient."

DACA recipients must not have been convicted of a felony, a significant misdemeanor or multiple misdemeanors. Ramirez had none of these, so his DACA status should have prevented his initial detention February 10, his lawyers contend.

A handout photo from the attorneys of Daniel Ramirez shows a tattoo on Ramirez's arm. His attorneys contend an ICE agent interrogating him incorrectly asserted that it was a gang tattoo.

At the holding facility, an agent asked Ramirez as many as seven times whether he was in a gang, Ramirez said in a personal declaration attached to his lawyers' filings.

"Each time, I said, 'No. I am not in a gang,' " Ramirez says.

After a second agent repeatedly insisted that he was in a gang, Ramirez told them that he "did nothing more than hang out with a few people who may have been Sureños, but that since I became an adult I have not spoken with any of those people.

"I never said that I was involved in that gang or any gang, or that I was a gang member. The opposite -- I kept say(ing) 'No,'" Ramirez says. "I never said that I hang out with gang members in Washington."

"Mr. Ramirez did not say these things because they are not true," said one of his attorneys, Mark Rosenbaum, calling the words that ICE attributed to Ramirez "utterly implausible and wholly fabricated."

As for the mark on Ramirez's forearm that the government calls a "gang tattoo": He says it has nothing to do with gangs.

His lawyers released a photo of the mark, which says "La Paz" and "BCS," with a star in the middle.

His attorneys contend that "La Paz" refers to the Mexican city where he is from. "BCS," they say, stands for the Mexican state of Baja California Sur, of which La Paz is the capital.

Bail hearing set for next week

The conflicting stories come amid immigrant rights attorneys' fears that President Donald Trump's administration will target Dreamers. About 750,000 people have received permission to stay under DACA.