After the 1783 Treaty of Paris, Britain ceded East and West Florida to Spain. Spain held them until 1821, when the U.S. purchased Florida. The territory was then split into the Florida Territory and the Alabama Territory. The western boundary was the Perdido River; the northern boundary ran from south of present-day Macon, Georgia, northwest to the Chattahoochee River. The Florida Panhandle remained part of the Mississippi Territory.