The First Seminole War between the British Empire and Seminole Indians in East Florida was started by Seminole aid for the American Insurgency against the British. This campaign, led by Sir Edward Pakenham, caused the effective control of the British in East Florida.
Not wishing war with Britain on top of the rebellions in their colonies, the Spanish opened negotiations with the British.
The resulting treaty, the Wellesley-Onís Treaty, gave Florida to Britain, and also finalised the border between British North America and New Spain. Furthur, the Spanish would give the British a tribute to help pay their debts incurred in the recent War of 1812, and the British army would help Spain in the Rebellion of New Spain.
This treaty improved Spanish-British relations, a contrast to the rivalry between these empires that was seen in previous centuries.