...as a former member of the USAF Security Police, we have a law in the US called Posse Comitatus that prevents the military from enforcing civil law.
I recognize some of the incidents alluded to here pre date this law, if my memory from promotion exams is correct it was passed in 1878.