Separate the military and the police.
The military, supposedly, fights the enemies of the state.
Cops, ostensibly, serve and protect the people.
If your militarize the police, or worse, deploy the military domestically, the enemies of the state tend to become the people.