These people are on US soil. If they are so dangerous, why are they not being tried and sent to prison, as opposed to being released in a country with questionable ability to keep them detained?
You're actively arguing that the president gets to supersede our legal system. Tell me, where does that end, in your eyes? Let's take it to the obvious, not-so-absurd conclusion: Can the president have US citizens on US soil killed? Can he have them imprisoned without trial? Can he have them deported?