After Jackson's attack on the Indians in Florida, it was clear that Spain could no longer maintain any semblance of control over the area. The United States government presented the Spanish with two alternatives: either they could bring the territory under control, or the United States would seize it. The Spanish decided that they would sell the area to the United States, rather than lose the territory in a war.
The Spanish agreed to sell the territory of Florida; as well as any claims they might have on the Oregon Territory; to the United States. In return, the US agreed to pay $5 million and assume any debts in the United States for which the Spanish government might be liable.