Article IV, Section 4 of the Constitution states that “The United States shall guarantee to every State in this Union a Republican Form of Government, and shall protect each of them against Invasion; and on Application of the Legislature, or the Executive (when the Legislature cannot be convened) against domestic Violence.” Scholars believe that this clause ensures that each state be run as a representative democracy, as opposed to a monarchy or a dictatorship. Courts, however, have been reluctant to specify what exactly a republican form of government means, leaving that decision exclusively to Congress.
This section also gives Congress the power (and obligation) to protect the states from an invasion by a foreign country or from significant violent uprisings within each state. It authorizes the legislature of each state (or the executive, if the legislature cannot be assembled in time) to request federal help with riots or other violence.
The United States Constitution, What It Says, What It Means, A Hip Pocket Guide