But by 1818, Spain was facing a troubling colonial situation in which the cession of Florida made sense. Spain had been exhausted by the Peninsular War in Europe and needed to rebuild its credibility and presence in its colonies. Revolutionaries in Central America and South America were beginning to demand independence. Spain was unwilling to invest further in Florida, encroached on by American settlers, and it worried about the border between New Spain and the United States. With only a minor military presence in Florida, Spain was not able to restrain the Seminole warriors who routinely crossed the border and raided American villages and farms, as well as protected southern slave refugees from slave owners and traders of the southern United States.[112] The Seminole people were also providing sanctuary for runaway slaves, those of which the United States wanted back.[113]
In response to Seminole attacks and their provision of aid to escaped slaves, Monroe ordered a military expedition to cross into Spanish Florida and attack the Seminoles. In this expedition, led by Andrew Jackson, the US Army displaced numerous Seminole people from their houses along with burning their towns. Jackson also seized the Spanish territorial capital of Pensacola. 