Florida became a U.S. territory in 1821 after Spain ceded it to the United States following the Adams-Onís Treaty. It then achieved statehood on March 3, 1845, becoming the 27th state in the Union.