The American Civil Liberties Union filed a petitioned in federal court Thursday on behalf of an American citizen captured on the battlefield in Syria last month, requesting that he be given access to a lawyer and a trial in criminal court.

The U.S. citizen, who the Pentagon has so far refused to name, surrendered to the Syrian Democratic Forces, a U.S.-backed militia comprised mostly of Kurds, on or around September 14, and was turned over to American military custody. His case is being viewed as a crucial test for the Trump administration, which has yet to offer a clear policy on how it will deal with detainees captured while fighting with insurgent groups.

The Defense Department is holding the prisoner as an “unlawful enemy combatant” at an undisclosed location in Iraq, the Associated Press reported. He has not been allowed to see a lawyer, so the ACLU filed a writ of habeas corpus on his behalf.

In the filing, the ACLU says the prisoner is an “an American citizen currently being unlawfully detained by the United States military in Iraq without charge, without access to counsel, and without access to a court.” The ACLU asked the court to order the Pentagon to give the prisoner access to an attorney. The advocacy group also asked the court to find that the prisoner’s military detention is illegal and that he can only be lawfully held if he is charged with a crime.

“Military detention of this U.S. citizen is both unlawful and unnecessary,” said Hina Shamsi, director of the ACLU’s National Security Project, in a statement. “Fighting with a group like ISIS is a very serious allegation, and unlike the military, the federal court system unquestionably has jurisdiction to decide his case. Instead of continuing to deny a U.S. citizen his constitutional rights, the Trump administration has an opportunity to do the right thing here.”

Likes presidents Bush and Obama before him, President Donald Trump now faces a choice between indefinitely holding the prisoner in military detention or handing him over to the Justice Department, who would likely quickly prosecute the case and sentence the alleged ISIS fighter to jail time, if convicted. In a landmark case on the rights of accused enemy combatants, the U.S. Supreme Court ruled in 2004 that an American citizen could be detained as an “enemy combatant,” but, under the Fifth Amendment, had the due process rights to challenge that designation before a neutral decision-maker.

According to the Associated Press, the Trump administration is considering a third option: handing the prisoner over to the custody of the U.S.-backed Iraqi government, which has faced numerous accusations of prisoner abuse, torture, and corruption.

Representatives from the International Committee of the Red Cross met with the prisoner on Friday to ensure he was being treated fairly. But consistent with the group’s confidentiality policy, it did not publicly disclose the prisoner’s name or location.

On the campaign trail, Trump promised to “load up” Guantanamo “with some bad dudes.” By contrast, President Obama refused to send new detainees to Guantanamo Bay and showed a preference for handing people over to civilian courts. In 2016, a Virginia man who fought for several months with ISIS surrendered to Iraqi Kurdish forces. He was flown back to the United States, where he was charged with and ultimately convicted of providing support to a terrorist organization.

Since 9/11, civilian courts have proven more than capable of prosecuting terror cases, handing down more than 620 convictions on terrorism-related charges. Meanwhile, the military commission system at Guantanamo has been stalled in pretrial motions for years, failing to move forward even in the prosecutions of the 9/11 conspirators.

Many human rights advocates have expressed concern that former President Barack Obama’s reluctance to accept new captives in detention led to the lack of a plan for how to deal with ISIS fighters that surrendered — the exact dilemma that Trump now finds himself in. Even worse, some argued, was that the lack of a policy could lead the military to prefer to kill ISIS fighters who might otherwise have surrendered. Under Trump, the Pentagon has overtly adopted a policy of “annihilation” in ISIS-controlled territory, increasing the intensity of airstrikes and even wiping out entire families.