United States territorial acquisitions
West Florida was declared to be a U.S. possession in 1810 by President James Madison after the territory had declared its independence from Spain. Madison ordered the U.S. Army to take control. Six weeks later, the army entered and occupied the capital, St. Francisville, putting an end to the republic after 74 days of independence. Spain did not relinquish its claim to sovereignty (see West Florida Controversy) until ratification of the Adams–Onís Treaty. General Andrew Jackson personally accepted the delivery of West Florida from its Spanish governor on July 17, 1821.
History of Pensacola, Florida
On March 3, 1845, Florida was admitted to the Union as the 27th state. Its admission had been slowed as the United States struggled to remove the Seminole Indians. After three Seminole Wars, it defeated some, forcing their removal to Indian Territory in what is now Oklahoma. The remaining Seminole had retreated to the Everglades and were never defeated. Due to rising tensions over slavery, Congress had decided not to alter the balance between slave and free states. Florida's admission was delayed until a free territory was ready for admission as a state. It was admitted the same year as Iowa. North Florida, including the Panhandle, remained the most populated part of the state.