A federal judge has called a U.S. prosecutor’s argument absurd and a problem of the government’s own making in a recent ruling that highlights the clash between criminal court processes and the nation’s increasingly controversial immigration policies.

Magistrate Judge Andrew Austin of the U.S. District Court for the Western District of Texas in Austin was frustrated by the prosecutor’s reasoning about why Austin should keep a defendant in jail rather than release him on pretrial bond for a felony charge of unlawful reentry. Unlawful re-entry cases have grown increasingly common under the Trump administration as it charges immigrants at the border en masse with the crime, and as U.S. Immigration and Customs Enforcement sweeps up undocumented immigrants in raids on employers.

Austin wrote that the prosecutor, Assistant U.S. Attorney Mark Marshall, argued that the court must detain the defendant, Edgar Alfredo Valladares, because he posed a significant flight risk. Why? Immigrations and Customs Enforcement planned to deport Valladares if he was released from jail.

“Yes, you read that correctly. The government contends that the defendant poses a serious risk of flight because if the undersigned releases him on conditions, the government will remove him from the country,” Austin wrote in the order. “It is perhaps a sign of the times that the court has to point out how absurd the government’s position is.”

Austin wrote that he’s handled detention hearings for 19 years and he’s released many immigrants on bond.

“Until the past few months, ICE did not deport these individuals, but instead waited until their court proceedings were completed and they had served their sentences before deporting them. Nothing in the law has changed over this time. What has changed is how the executive branch has decided to handle these cases,” Austin wrote, adding that the executive branch can handle the cases as it wishes—as long as it doesn’t interfere with the judiciary’s exclusive powers.

Marshall didn’t return a call seeking comment before deadline. Neither did Daryl Fields, spokesman for the U.S. Attorney’s Office for the Western District of Texas, nor anyone from ICE’s public affairs office. Assistant Federal Public Defender Horatio Aldredge of Austin, who represents Valladares, also didn’t return a call.

Read Judge Austin’s orders below:

Angela Morris is a freelance journalist. Follow her on Twitter at @AMorrisReports