When European settlers arrived in North America, Spain was the first to establish a colony at Florida. Over time, the colony grew in size and was then divided into two parts: East Florida and West Florida.
Later, Spain lost the control of this colony to Britain. Britain continued to rule Florida until the American War of Independence in 1775. After the war was over and Britain defeated, both East and West Florida came under Spanish control.
Florida came under Spanish control in 1783. But Spain didn’t have a very strong government in Florida. As a result, Florida became a refuge for many Native Americans and runaway slaves who escaped from the American states. At the same time, white settlers from the American states started to move westwards and many of them settled down in Florida as well. By 1810, the population of white settlers in West Florida had grown quite large and they rebelled against Spanish rule.
The rebellion of American settlers in West Florida led to negotiations between USA and Spain in 1815. American government said that when it had purchased the Louisiana Territory in 1804 from France, West Florida was included in it and so, it belonged to USA. Spain did not agree. Also, Spain suspected that the American government was supporting the rebellion of the white settlers. So the negotiations did not get anywhere and failed.
In 1818, American General Andrew Jackson was following a group of Seminoles and escaped slaves. This group crossed the boundary line and went to Florida. General Jackson continued to follow them and when they took refuge in a Spanish fort, General Jackson and the American army took the fort by force.
At that time, Americans in the state of Georgia believed that the Seminoles and runaway slaves were becoming a serious threat to them. So when General Jackson took the fort and took the group of Seminoles and slaves as prisoners, the American population was quite pleased.
At one side, General Andrew Jackson became quite popular. At the other hand, American population started to think that perhaps the American settlers in West Florida were rebelling for good reason. This led the American politicians to start negotiations with Spain once again.
So in 1818, Spain and USA began to negotiate again. By this time, Spain had become a weak power in Europe and its control on Spanish colonies in America was also slipping. So America demanded that Spain officially accept West Florida as being part of USA and the Louisiana Purchase.
Furthermore, America demanded that Spain should either control the population in East Florida or simply hand over the area to USA. Spain agreed to give up both East Florida and West Florida to the USA. In return, US government agreed to recognize that the region of Texas rightfully belonged to Spain. Spain was also able to retain its control over territories in California and New Mexico. The US government only had to pay Spain $5 million for the trouble caused by white settlers in Florida.