The Louisiana Purchase of 1803 created friction points between the United States and Spain, especially in Florida and Texas. John Quincy Adams, US Secretary of State to President James Monroe, and Luis de Onís y González-Vara, Spain’s diplomatic envoy and minister plenipotentiary, represented their countries in negotiations to resolve these issues.
In 1817-18, General Andrew Jackson led his troops into northeastern Florida, seizing control of the area as part of a campaign against the Seminole Indians. Adams used the presence of the US military to bargain for the cession of Florida to the US; the States had to pay legal claims of American citizens against Spain up to five million dollars. Spain also gave up their claims to the Oregon Territory. In return, Spain was able to shore up the eastern border of Nueva España in Texas against American settlers, with a border at the Sabine River.
The border was drawn along the Sabine, Red, and Arkansas Rivers before hitting the 42nd parallel. Several of these rivers remained only partially or un-charted, leaving the border in dispute as to its precise location.
The treaty was signed on February 22, 1819. However, the treaty was not ratified until precisely two years later, on February 22, 1821. Then, it was only in force for 183 days. On August 24, 1821, Spain recognized the independence of Mexico under the Treaty of Córdoba. The Adams-Onís border then became the border between Mexico and the US, as recognized by the Treaty of Limits signed in 1828 and authorized in 1832.