Posse Comitatus (power of the county) Act was enacted in 1878 to placate the South by withdrawing Federal troops after the hotly contested election of 1876.
It supposedly prohibits the Armed Forces from interfering in States' law enforcement - except in extreme circumstances.
I suppose the disturbance at the G-20 summit is an extreme circumstance.
From USApresidents.org:
Election of 1876
However, as with all elections, the decision was left to the U.S. Electoral College , where the votes of four states were contested. In order to win, the candidates had to muster 185 votes: Tilden was short just one, with 184 votes, Hayes had 165, with 20 votes representing four states were contested. To make matters worse, three of these states (Florida , Louisiana , and South Carolina) were in the South, which was still under military occupation.
After months of deliberation and bargaining, Southern Democrats were assured that if Hayes were elected, he would pull federal troops out of the south and end Reconstruction. In return, the Democrats agreed to a committee to determine the final outcome of the election. The committee, which consisted of eight Republicans and seven Democrats several of whom were also Supreme Court Justices, voted to give all the disputed electoral votes to Hayes. The Republicans justified this by claiming that the problem in these states was over who had the right to vote. The Democrats, on the other hand, felt that they had been robbed of the presidency, and called Hayes "Rutherfraud."
In 2004, Chief Justrice of the United States Supreme Court William Rehnquist wrote of the Supreme Court Justices involved in the decision and concluded, “They may have tarnished the reputation of the Court, but they may also have saved the nation from, if not widespread violence, a situation fraught with combustible uncertainty.”
Sylvia