The Trump administration’s proposal to send Islamic State fighters to the offshore prison at Guantanamo Bay could end up destroying the shaky legal basis for the yearslong U.S. bombing campaign against the terrorist group.

The government is considering transferring Alexanda Amon Kotey and El Shafee Elsheikh, two ISIS fighters accused of participating in the murder of American hostages, to the Guantanamo facility, NBC News reported on Thursday. If President Donald Trump follows through on this plan, one or both men would probably oppose it. In the resulting court battle, the government would likely be forced to defend using a law that was passed in 2001 to authorize war against the perpetrators of the Sept. 11 attacks to fight a group that was formed more than a decade later.

For many years, the government has argued that various terrorist organizations are “associated forces” of al-Qaeda and therefore legitimate targets under the 2001 Authorization for Use of Military Force. Since the U.S. started bombing ISIS in Iraq and Syria in 2014, the government has pointed to the AUMF as the legal basis for fighting that group.

Legal scholars are divided over whether ISIS, which al-Qaeda formally split from in 2014, falls under the 2001 war authorization. Successive presidents have managed to avoid litigating the issue in court. But if an ISIS fighter were sent to Guantanamo, he would almost certainly challenge his imprisonment by filing a habeas petition and raising the murky legal basis of the entire military campaign against ISIS.

“Trump sending additional people to Guantanamo virtually guarantees a litigation challenge about the authority to detain alleged ISIS fighters under the 2001 AUMF,” said Hina Shamsi, director of the national security project at the American Civil Liberties Union.

Federal courts tend to be deferential to the executive branch’s authority to make foreign policy and war-waging decisions. It would still be a risky legal battle for the Trump administration: An appeals court decision saying the government can’t detain ISIS fighters at Guantanamo would likely undermine the military’s ability to fight the Islamic State without a new war authorization.

Both the Trump and Obama administrations have worked to avoid this kind of court battle. President Barack Obama seemed aware that the 2001 AUMF was a weak legal basis for a war against ISIS. He sent Congress a draft version of a new ISIS-specific AUMF in 2015, months after he started bombing the group. But lawmakers, split along partisan lines about how restrictive a new war authorization should be, repeatedly punted on the issue.

Trump’s Justice Department has made it clear that it does not want a court battle over the 2001 AUMF’s application to the Islamic State. The government is currently facing a habeas challenge from an unnamed American accused of fighting with ISIS who is being held by the U.S. military in Iraq. Once it became clear that the case would eventually delve into AUMF issues, the government tried to release the alleged terrorist into Syria.

A good way for the government to avoid this kind of legal fight would be to send ISIS fighters to the U.S. for prosecution in federal courts, which have proven to be an effective venue for securing terrorism convictions.

“Federal courts are used to dealing with terrorism cases and have a legitimate basis under the law for doing so,” said Shamsi, the ACLU lawyer. “By contrast, the novel military commissions [operating in Guantanamo] are still mired in disputes about fundamental legal, procedural and trial issues.”

The five men accused of plotting the Sept. 11 attacks, for example, were arraigned before a military commission in Guantanamo in 2012. Their case is still in pretrial proceedings and the judge overseeing the case plans to retire next month.