The recorded history of Alabama began when Spanish explorers in the 16th century became the first Europeans to reach this area. The expedition of Hernando de Soto passed through Mabila and other parts of the state in 1540. More than 160 years later, the French founded the first European settlement in the region at Old Mobile in 1702. The city was moved to the current site of Mobile in 1711. This area was claimed by the French from 1702 to 1763 as part of La Louisiane. After the French lost the Seven Years' War, it became part of British West Florida from 1763 to 1783.
After the United States victory in the American Revolutionary War, the territory was divided between the United States and Spain. The latter retained control of this western territory from 1783 until the surrender of the Spanish garrison at Mobile to U.S. forces on April 13, 1813.
What is now the counties of Baldwin and Mobile became part of Spanish West Florida in 1783, part of the independent Republic of West Florida in 1810, and was finally added to the Mississippi Territory in 1812. Most of what is now the northern two-thirds of Alabama was known as the Yazoo lands beginning during the British colonial period. It was claimed by the Province of Georgia from 1767 onwards. Following the Revolutionary War, it remained a part of Georgia, although heavily disputed.
With the exception of the immediate area around Mobile and the Yazoo lands, what is now the lower one-third Alabama was made part of the Mississippi Territory when it was organized in 1798. The Yazoo lands were added to the territory in 1804, following the Yazoo land scandal. Spain kept a claim on its former Spanish West Florida territory in what would become the coastal counties until the Adams–Onís Treaty officially ceded it to the United States in 1819.
Prior to the admission of Mississippi as a state on December 10, 1817, the more sparsely settled eastern half of the territory was separated and named the Alabama Territory. The Alabama Territory was created by the United States Congress on March 3, 1817. St. Stephens, now abandoned, served as the territorial capital from 1817 to 1819.
The U.S. Congress selected Huntsville as the site for the first Constitutional Convention of Alabama after it was approved to become the 22nd state. From July 5 to August 2, 1819, delegates met to prepare the new state constitution. Huntsville served as the temporary capital of Alabama from 1819 to 1820, when the seat of state government was moved to Cahaba in Dallas County.
Cahaba, now a ghost town, was the first permanent state capital from 1820 to 1825. Alabama Fever was already underway when the state was admitted to the Union, with settlers and land speculators pouring into the state to take advantage of fertile land suitable for cotton cultivation. Part of the frontier in the 1820s and 1830s, its constitution provided for universal suffrage for White men.
From 1826 to 1846, Tuscaloosa served as the capital of Alabama. On January 30, 1846, the Alabama legislature announced that it had voted to move the capital city from Tuscaloosa to Montgomery. The first legislative session in the new capital met in December 1847. A new capitol building was erected. The first structure burned down in 1849, but was rebuilt on the same site in 1851. This second capitol building in Montgomery remains to the present day.
On January 11, 1861, Alabama declared its secession from the Union. After remaining an independent republic for a few days, it joined the Confederate States of America. The Confederacy's capital was initially located at Montgomery. Alabama was heavily involved in the American Civil War. Although comparatively few battles were fought in the state, Alabama contributed about 120,000 soldiers to the war effort.
Alabama was under military rule from the end of the war in May 1865 until its official restoration to the Union in 1868. Following the war, the state remained chiefly agricultural, with an economy tied to cotton. During Reconstruction, state legislators ratified a new state constitution in 1868 that created the state's first public school system and expanded women's rights. Legislators funded numerous public road and railroad projects,
Reconstruction in Alabama ended in 1874, when the Democrats regained control of the legislature and governor's office and a new state constitution was written and adopted in 1875,