The Act is supposed to prohibit most members of the federal uniformed services (today the Army, Air Force, and State National Guard forces when such are called into federal service) from exercising nominally state law enforcement, police, or peace officer powers that maintain "law and order" on non-federal property (states and their counties and municipal divisions) within the United States. It is thought by many to be one of the most important laws (it is not a constitutional provision) which tempers the provisions of the Insurrection Act and helps to ensure that the United States remains something more than just a rich banana republic. Yet it seems that the National Guard is routinely called upon to serve a police keeping role in clear violation of US Code. How did this happen?
Americans can trace their general abhorrence for the abuse of power to the actions of their "unjust King" and events that occurred before the creation of their nation. The so-called Boston Massacre of 1770 is now part of the American mythology: a detachment of the British army was sent to Boston to act in a police role and ended up killing several rioters. When the Constitution was drafted and due process was enshrined, the founders also understood that a peace keeping force would be required. Article I, section 8 permitted the states to provide militia to "execute the laws of the nation, suppress insurrections, and repel invasions." Up until the Civil War the militia was used occasionally in such civilian peace keeping, but was always treated as a civilian posse and help liable for their actions. This all changed during the war and Reconstruction when the use of the military in this role became something akin to a force "above the law" and it was in response to the overuse and abuse of this power that the Posse Comitatus Act was drafted in 1878 in which the use of the military on US soil was equated to "martial law".
TITLE 18 > PART I > CHAPTER 67 > § 1385
Whoever, except in cases and under circumstances expressly authorized by the Constitution or Act of Congress, willfully uses any part of the Army or the Air Force as a posse comitatus or otherwise to execute the laws shall be fined under this title or imprisoned not more than two years, or both.
Major Craig T. Trebilcock (now a civilian lawyer) made clear in his essay, The Myth of Posse Comitatus dated October, 2000 that the Act has been systematically weakened through legislation in the last 30 years first by Reagan in order to permit the use of US military personnel on American soil in prosecution of his fabulously successful "War on Drugs", then by Bush the elder to permit their use to "deter terrorism" at the Atlanta Olympics, and more recently by Bush the younger in a push to deploy them on the borders for interdiction of illegal immigrants (something I'm not opposed to) and in the John Warner Defense Act which allowed the President to declare a "public emergency" and station troops anywhere in America and take control of state-based National Guard units without the consent of the governor or local authorities, in order to "suppress public disorder."
TITLE 6 > CHAPTER 1 > SUBCHAPTER VIII > Part H > § 466 While the GW Bush Act was ostensibly repealed in 2008 and Congress reaffirmed the spirit of the original Act, close inspection of the text reveals to some that the "fix" actually also left the Act weakened.