After the War of 1812 much of America's attention turned to exploration and settlement of its territory to the West, which had been greatly enlarged by the Louisiana Purchase. Families of pioneers swept westward and founded new communities throughout what is now the Midwest, and between 1816 and 1821, six new states were admitted to the Union.
The land boom was fed by encouragement from the federal government and the actions of land speculators, who bought up large tracts of land in order to sell it in parcels to farmers at exorbitant prices. These farmers did not mind high prices and high interest on loans due to the growing success of American agricultural products. Most western farmers became cash croppers who sometimes neglected subsistence farming in order to focus on marketable commodities. Soon the farmers' dependence on distant markets caught up with them, however, as the state bank system that had sprung up to support speculation collapsed, dragging agricultural prices and land values down with it. Many western settlers suffered greatly during the Panic of 1819, but most survived and continued the conquest of the West.
A major aspect of the conquest of the West was the removal of the Indians who dwelled there. Under the leadership of President Andrew Jackson, the Indians who remained East of the Mississippi were cruelly and violently driven from their homes and concentrated in reservations in what is now Oklahoma. The US Army crushed any resistance to removal. With the West cleared of this obstacle, westerners focused on developing new methods of transporting their goods to market. The canal and railroad systems, which grew up in the North, facilitated a much larger volume of trade and manufacturing while reducing costs a great deal. Great cities sprang up throughout the North and Northwest, bolstered by the improvement in transportation.
After the Midwest had been substantially developed, the national focus turned toward the far west. The territory of Texas, controlled by the Spanish, was settled by Americans, who eventually undertook the Texas Rebellion in efforts to win independence. When the United States admitted Texas to the Union in 1845, the Mexican government was outraged, and from 1846 to 1848, the two nation's squared off in the Mexican War. With a resounding victory, the United States gained control of Texas, New Mexico, and California. The Oregon territory was annexed in 1846 as well, and the US controlled the land all the way to the Pacific Ocean.
As the population of the West soared and the prospects of statehood for western territories appeared clearer and clearer, the nation battled over the future of slavery in the West. This battle was one reason for the Civil War, which slowed the acceleration of expansion. However, the last three decades of the nineteenth century saw the return of accelerating expansion due to the successful struggle to contain the Plains Indians in reservations, and the completion of the transcontinental railroad in 1869. By the early twentieth century, the organization of the West was completed, and the United States consisted of all 48 contiguous states.