<Tr> <Th> Citations </Th> <Td> 8 Stat. 252; TS 327; 11 Bevans 528; 3 Miller 3 </Td> </Tr> <Tr> <Td_colspan="2"> Terminated by treaty of friendship and general relations of July 3, 1902 (33 Stat. 2105; TS 422; 11 Bevans 628). </Td> </Tr> <P> The Adams--Onís Treaty of 1819, also known as the Transcontinental Treaty, the Florida Purchase Treaty, or the Florida Treaty, was a treaty between the United States and Spain in 1819 that ceded Florida to the U.S. and defined the boundary between the U.S. and New Spain . It settled a standing border dispute between the two countries and was considered a triumph of American diplomacy . It came in the midst of increasing tensions related to Spain's territorial boundaries in North America against the United States and Great Britain in the aftermath of the American Revolution; it also came during the Latin American wars of independence . Florida had become a burden to Spain, which could not afford to send settlers or garrisons . Madrid decided to cede the territory to the United States through the Adams--Onís Treaty in exchange for settling the boundary dispute along the Sabine River in Spanish Texas . The treaty established the boundary of U.S. territory and claims through the Rocky Mountains and west to the Pacific Ocean, in exchange for the U.S. paying residents' claims against the Spanish government up to a total of $5,000,000 and relinquishing the US claims on parts of Spanish Texas west of the Sabine River and other Spanish areas, under the terms of the Louisiana Purchase . </P> <P> The treaty remained in full effect for only 183 days: from February 22, 1821, to August 24, 1821, when Spain signed the Treaty of Córdoba acknowledging the independence of Mexico . The Treaty of Limits, signed in 1828 and effective in 1832, recognized the border defined by the Adams--Onís Treaty as the boundary between the United States and Mexico . </P>

Why did spain give florida up to the united states
find me the text answering this question