The colonies of East Florida and West Florida remained loyal to the British during the war for American independence, but by the Treaty of Paris in 1783 they returned to Spanish control. After 1783, Americans immigrants moved into West Florida.
In 1810, these American settlers in West Florida rebelled, declaring independence from Spain. President James Madison and Congress used the incident to claim the region, knowing full well that the Spanish government was seriously weakened by Napoleon’s invasion of Spain. The United States asserted that the portion of West Florida was part of the Louisiana Purchase of 1803. Negotiations over Florida began in with the mission of Don Luis de Onís to Washington in 1815 to meet Secretary of State James Monroe. The issue was not resolved until Monroe was president and John Quincy Adams his Secretary of State.
U.S. Spanish relations were strained over suspicions of American support for the independence struggles of Spanish-American colonies, the situation became critical when General Andrew Jackson seized the Spanish forts at Pensacola and St. Marks in his 1818 authorized raid against Seminoles and escaped slaves. Jackson executed two British citizens on charges of inciting the Indians and runaways. Monroe’s government considered denouncing Jackson’s actions, but Adams defended Jackson citing the necessity to restrain the Indians and escaped slaves.
Adams used the Jackson’s military action to present Spain with a demand to either control the inhabitants of East Florida or cede it to the United States. Minister Onís and Secretary Adams reached an agreement whereby Spain ceded East Florida to the United States and renounced all claim to West Florida. Spain received no compensation, but the United States agreed to assume liability for $5 million in damage done by American citizens who rebelled against Spain. Under the Onís-Adams Treaty of 1819 (also called the Transcontinental Treaty and ratified in 1821) the United States and Spain defined the western limits of the Louisiana Purchase and Spain surrendered its claims to the Pacific Northwest. In return, the United States recognized Spanish sovereignty over Texas.
Source: Acquisition of Florida: Treaty of Adams-Onis (1819) and Transcontinental Treaty (1821)
Office of the Historian, U.S. Department of State