https://mtsu.edu/first-amendment/article/338/ex-parte-vallandigham
…In Ex parte Vallandigham, 68 U.S. 243 (1863), the Supreme Court decided that it had no jurisdiction to hear appeals from a military commission that had sentenced a gubernatorial candidate to life in prison for an inflammatory speech, thus missing an opportunity to set an important precedent on behalf of freedom of speech…
[The Court reversed itself after the War]
https://www.oyez.org/cases/1850-1900/71us2
…Writing for the Court, Justice David Davis held that trials of civilians by presidentially created military commissions are unconstitutional. Specifically, it is unconstitutional to try civilians by military tribunals unless there is no civilian court available. The military commission therefore did not have jurisdiction to try and sentence Milligan, and he was entitled to discharge…
Good thing. Many administrations would eagerly count on military commissions to help with their political problems.