The precursor to the permanent legislature was the Provisional Congress of the Confederate States, which helped establish the Confederacy as a state. Following elections held in states, refugee colonies and army camps in November 1861, the 1st Confederate Congress met in four sessions. The 1863 elections led to many former Democrats losing to former Whigs. The 2nd Confederate Congress met in two sessions following an intersession during the military campaign season beginning November 7, 1864 and ending on March 18, 1865, shortly before the downfall of the Confederacy.