During the American Civil War, the secession of Missouri from the Union was controversial because of the state's disputed status. Missouri was claimed by both the Union and the Confederacy, had two rival state governments, and sent representatives to both the United States Congress and the Confederate Congress. Despite sporadic threats from pro-Confederate irregular armies, the Union government had established permanent control of Missouri by the end of 1861, with the Confederate government functioning only as a government in exile for the duration of the war.