During the War of 1812, Jackson was commissioned a major general in the U.S. Army and became a hero, defeating the British at the Battle of New Orleans in 1815. He invaded Spanish-held Florida in 1818. Following Florida's cession to the United States, Jackson served as its territorial governor in 1821. He died on 8 June 1845, in Nashville.