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 from the Mississippi to the Peridido Rivers was part of the Louisiana Purchase of 1803. Negotiations over Florida began in earnest 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. Although U.S.-Spanish relations were strained over suspicions of American support for the independence struggles of Spanish-American colonies, the situation became critical when Gen. Andrew Jackson seized the Spanish forts at Pensacola and St. Marks in his 1818 authorized raid against Seminoles and escaped slaves whom were viewed as a threat to Georgia. Jackson executed two British citizens on charges of inciting the Indians and runaways. Monroe's government seriously considered denouncing Jackson's actions, but Adams defended Jackson citing the necessity to restrain the Indians and escaped slaves since the Spanish failed to do so. Adams also sensed that Jackson's Seminole campaign was popular with Americans, and it strengthened his diplomatic hand with Spain.
Adams used 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.