Stephen I. Vladeck is a law professor at the University of Texas and co-editor of the online forum Just Security.

President Trump suggested Wednesday that he might send Sayfullo Saipov — the Uzbek immigrant accused of killing eight people in a terrorist attack in Lower Manhattan on Tuesday — to be held as an enemy combatant at the U.S. military detention facility at Guantanamo Bay, Cuba. It's hard to imagine a worse idea.

Let's take the legal obstacles to this approach first: Unlike everyone else who has been held at Guantanamo since 2001, Saipov was lawfully present in the United States at the time of his arrest and is therefore entitled to a full suite of constitutional protections — especially those provided by the Fifth Amendment's due process clause. Although the Constitution does not categorically prohibit military detention, it erects a high bar for individuals arrested on U.S. soil, and for good reason. That's why even the George W. Bush administration claimed such authority with respect to only one noncitizen after Sept. 11 — and why lower courts divided over the legality of this detention in rulings that, after the detainee was indicted on civilian criminal charges, were ultimately vacated by the Supreme Court.

It also remains unresolved whether the statute on which the government's detention authority would rest in this case — the 2001 Authorization for Use of Military Force — even applies to the Islamic State, to which Saipov allegedly pledged allegiance in notes found in the truck he is said to have used in the attack. The statute was directed at the groups that attacked the United States on Sept. 11, and the Islamic State did not come along until later. Like Trump, President Barack Obama argued that Congress has indeed provided the necessary authority for the use of force against the terrorist group, but no court has yet addressed the question.

So the law on both of these major questions is unsettled. That doesn't mean the president cannot force the issue, but in both cases, he would be taking a substantial risk. Indeed, there are few scenarios in which the government would be less likely to prevail on the critical question of whether the 2001 AUMF covers the Islamic State than in the context of the long-term military detention of someone arrested within the United States.

But beyond the legal issues, such a move would also be completely unnecessary. While Trump may believe the U.S. criminal-justice system is "a joke" and "a laughingstock," as he declared Wednesday in making his case, nothing could be further from the truth — especially in terrorism cases.

Since 2001, the government has secured more than 600 convictions in terrorism prosecutions in civilian federal courts, virtually none of which have been reversed. And although some of Guantanamo's defenders, such as Sen. Lindsey O. Graham (R-S.C.), have argued that military detention is necessary in order to interrogate terrorism suspects like Saipov, that ignores settled precedent to the contrary.

It's true that the "Miranda rule" generally does limit the government's ability to interrogate criminal suspects, but it is only an exclusionary rule; even when violated, it simply limits the government's ability to use a suspect's statements against him at trial. Given the apparent physical evidence against Saipov, it's hard to see why that would matter here. In any event, courts have also recognized a "public safety" exception to Miranda — which allows the government not only to interrogate suspects without complying with the rule but also to use suspects' statements against them at trial in certain limited circumstances. Because of that exception, military detention is not necessary in cases like these.

But above all, sending Saipov to Guantanamo would simply be unwise. For all of the successes of the civilian courts in post-Sept. 11 terrorism cases, the military commissions at Guantanamo have produced only eight convictions in 15 years, three of which were thrown out on appeal.

If anyone needed further evidence of the dysfunction that continues to surround the Guantanamo proceedings, at almost the same time as the president's comments, a military judge was ordering the chief Guantanamo defense counsel — Marine Corps Brig. Gen. John Baker — taken into custody for allowing his civilian lawyers to resign over an ethical conflict. Reasonable minds will surely continue to disagree about the answers to some of the legal questions surrounding Guantanamo, including the episode involving Baker. But what no one can deny is that these military proceedings have been massively inefficient and hotly contested.

And although the point may be lost on Trump, it ought not to be lost on us: The goal, in the end, should not be to score political points. It should be to serve justice — not only for the victims of Tuesday's horrific attack but for its perpetrator, as well.