West Florida was a region on the north shore of the Gulf of Mexico, which underwent several boundary and sovereignty changes during its history. The province was established by the British in 1763 out of lands ceded from the Spanish and French. As its name suggests, it was formed out of the Western part of formerly Spanish Florida (East Florida formed the eastern part), along with lands taken from French Louisiana; West Florida's capital was Pensacola. The colony included most of what is now the Florida Panhandle, plus parts of the modern U.S. states of Louisiana, Mississippi, and Alabama.Great Britain established West and East Florida out of land taken from France and Spain after the French and Indian War. As the newly acquired territory was too large to govern from one administrative center, the British divided it into two new colonies separated by the Apalachicola River. British West Florida's government was based in Pensacola; and the colony included the part of formerly Spanish Florida which lay west of the Apalachicola, plus parts of formerly French Louisiana. It thus comprised all territory between the Mississippi and Apalachicola Rivers, with a northern boundary which shifted several times over the subsequent years.Both West and East Florida remained loyal to the British crown during the American Revolution, and served as havens for Tories fleeing from the Thirteen Colonies. Spain invaded West Florida and captured Pensacola in 1781, and after the war Britain ceded both Floridas to Spain. However, the lack of defined boundaries led to a series of border disputes between Spanish West Florida and the fledgling United States known as the West Florida Controversy. Disagreements with the Spanish government led American and English settlers between the Mississippi and Perdido Rivers to declare that area the independent Republic of West Florida in 1810. This was soon annexed by the United States, which claimed the region as part of the Louisiana Purchase of 1803. In 1819 the United States negotiated the purchase of the remainder of West Florida and all of East Florida in the Adams–Onís Treaty, and in 1822 both were merged into the Florida Territory.