In the wake of the end of Reconstruction in 1877, federal law was enacted to make illegal using federal active duty troops as enforcers of laws on American soil except in emergency circumstances– in other words, to make sure nothing like the Military reconstruction of the South could ever happen again. Thus, to this day, domestic military policy is governed by the Posse Comitatus Act. Read here (http://civilliberty.about.com/od/waronterror/a/posse_act.htm) for a summary of the law and its consequences.
Interestingly, there has recently been some discussion that the law needs to be changed particularly in light of the creation of the Department of Homeland Security in the wake of the terrorist attacks of September 11, 2001. This law is the reason why the National Guard, rather than the regular military, is used after national disasters, and, in a limited manner, along our nation’s borders. But the law has its roots in Southern resentment of the use of federal troops to enforce the laws regarding the treatment of freedmen during and after the Civil War.