why did spain so readily agree to sell florida to the united states after years of colonizing it?
They realized that they could not keep the United States from talking over the Florida territory so in 1819 Spain agreed to sell Florida to the United States. The Adams-Onis Treaty was approved by Spain and the United States in 1821.
Florida had become a burden to Spain, which could not afford to send settlers or garrisons . They decided to cede the territory to the U.S. through the Adams-Onis Treaty in exchange for settling the boundary dispute along the Sabine River in Spanish Texas