American ISIS suspect freed from US custody after 13 months without charges The ACLU represented the suspect, who was released on Sunday.

The Trump administration has released an American citizen who was captured and accused of being a member of ISIS, but never charged after more than a year in U.S. custody.

His release ends the long legal saga and questions over what power the U.S. government has to detain a U.S. citizen and what power the executive branch has to fight ISIS without explicit congressional authorization -- questions that will now remain largely unanswered.

The man, who requested anonymity and was referred to as "John Doe" in court filings, was released on Sunday, a spokesperson for the ACLU confirmed to ABC News Monday. The ACLU, which represented the suspect in his battle with the U.S. government, said it could not disclose where he was released because of a confidential settlement agreement with the government, but a U.S. official confirmed he was freed in Bahrain, where his wife and daughter are living, according to the New York Times.

"This is a victory our client fought for long and hard. The victory sends a strong message that the president cannot take away an American’s liberty without due process, and it shows the continuing importance of judicial review," ACLU senior staff attorney Jonathan Hafetz said in a statement.

"John Doe," whom the Times identified as Abdulrahman Ahmad Alsheikh, was originally detained in September 2017 by Kurdish forces of the Syrian Democratic Army, America's ally on the ground in Syria, who then handed him over to U.S. officials.

The U.S. government argued that because he was an "enemy combatant" who was captured on the battlefield working for ISIS, he could be detained indefinitely, citing the 2001 Authorization for the Use of Military Force (AUMF)that gives the president the legal ability to go after al Qaeda, the Taliban, and their supporters.

But the ACLU and "John Doe" denied the allegations against him and argued that the AUMF did not cover the war against ISIS. They demanded that "John Doe" be charged or released.

Instead, the U.S. first tried to transfer "John Doe," a dual U.S.-Saudi citizen, to Saudi Arabia's custody without informing the court or his lawyers. But a federal court blocked that plan, writing that it was unprecedented: "We know of no instance -- in the history of the United States -- in which the government has forcibly transferred an American citizen from one foreign country to another."

Afterward, the U.S. instead proposed dropping "John Doe" in Syria near where he was first picked up, leaving him with his clothes, $4,210 in cash -- the same amount he had when he was captured -- a new cell phone, and "sufficient food and water to last for several days," according to a government filing.

That plan was also blocked by a court after the ACLU challenged it, calling it a "death warrant" and "a disgraceful way to treat an American citizen."

Shortly after that, according to the ACLU, the government began settlement discussions with them, continuing to hold "John Doe" in detention in Iraq until his release Sunday.

The U.S. government accused "John Doe" of traveling to Syria in 2014 and again in 2015 to join ISIS as he used a Twitter account to promote and interact with the terror group. He told U.S. investigators that he worked for the group after he entered Syria in March 2015 in various administrative roles. But he said that he did so unwillingly as a prisoner after entering Syria as a freelance journalist, according to court filings.

While the U.S. government called him a "fighter," it never detailed whether he picked up a weapon and fought and when. In the end, the U.S. never brought charges against him, with the ACLU saying it was "unwilling to justify our client's detention to a court."

Still, the government was allowed to detain a U.S. citizen for more than 13 months without charging him with a crime, a case that some legal experts warn sets a dangerous precedent.

ABC News's Luis Martinez contributed to this report.