The stumbling block is if the President invokes the Insurrection Act. Which is a bit of a gray area.
https://en.m.wikipedia.org/wiki/Insurrection_Act_of_1807