During James Monroe's presidency, the United States faced several important challenges with other countries. One of the biggest involved Spain, which still controlled Florida. American leaders believed Florida was important because it bordered the United States and affected the nation's security, trade, and continued growth. Resolving this dispute was a key achievement in Monroe's foreign policy.
The United States and Spain had disagreed over Florida for years. Spain controlled East Florida and claimed West Florida, but its power in the region was weakening. After the United States purchased Louisiana in 1803, American leaders argued that part of West Florida belonged to the United States. Spain disagreed, and the boundary remained a source of conflict.
Florida also mattered because of its location. U.S. leaders thought that controlling Florida would safeguard the southern border. It would also boost trade through the Gulf of Mexico and the Mississippi River. President Monroe sent General Andrew Jackson to the area as tensions rose.

In 1817 and 1818, Jackson led U.S. forces into Florida during the First Seminole War. He captured the Spanish forts at Pensacola and St. Marks, despite Spain's protests. At the same time, Spain was struggling with problems in Europe and independence movements in its American colonies. It was becoming harder for Spain to defend Florida. Jackson's actions increased pressure on Spain to reach an agreement.
Secretary of State John Quincy Adams used these events to pressure Spain. He argued that Spain either needed to keep order in Florida or give the territory to the United States. Spain eventually agreed to negotiate. The two countries signed the Adams–Onís Treaty on February 22, 1819.

Under the treaty, Spain ceded East Florida to the United States and gave up its claim to West Florida. In return, the United States gave up its claims to Texas and agreed to pay up to $5 million in claims made by American citizens against Spain. The treaty was ratified in 1821.
The Adams–Onís Treaty expanded the United States and settled a long-running dispute with Spain. By gaining Florida, the United States strengthened its control of the Southeast and secured its southern border. The agreement marked an important step in the nation's continued growth.