LOS ANGELES — More than two years ago, Daniel Ramirez Medina, an unauthorized immigrant, applied for a special program created under the Obama administration that would allow him to stay and work in the United States.

But on Friday morning, when federal immigration agents showed up at his home in Seattle to detain his father, they took Mr. Ramirez, 23, as well. His lawyers have now sued the federal government, arguing that he is being held in custody unconstitutionally, in an “unprecedented and unjustified” case.

“This is a clear violation of his rights,” said Mark Rosenbaum, a lawyer with Public Counsel, a pro bono law firm, who helped file the case on Monday in Federal District Court in Seattle. “There was a solemn promise from the executive branch that they would be protected. People have staked their lives and well-being on that promise.”

President Trump has been pushing to speed up deportations of unauthorized immigrants, fulfilling a campaign pledge. Since he signed an executive order on Jan. 25 vastly expanding who is considered a priority for deportation, there have been reports of widespread roundups by Immigration and Customs Enforcement, including the arrests of more than 600 people across the country last week. It was still unclear, however, whether enforcement had significantly increased; unauthorized immigrants were regularly detained and deported during the Obama administration.