Andrew Jackson (March 15, 1767 – June 8, 1845) was the seventh President of the United States (1829–37). He was born near the end of the colonial era, somewhere near the then-unmarked border between North and South Carolina, into a recently immigrated Scots-Irish farming family of relatively modest means. During the American Revolutionary War Jackson, whose family supported the revolutionary cause, acted as a courier. He was captured, at age 13, and mistreated by his British captors. He later became a lawyer. He was elected to the U.S. House of Representatives, and then to the U.S. Senate. In 1801, Jackson was appointed colonel in the Tennessee militia, which became his political as well as military base. Jackson owned hundreds of slaves who worked on the Hermitage plantation which he acquired in 1804. He killed a man in a duel in 1806, over a matter of honor regarding his wife Rachel. Jackson gained national fame through his role in the War of 1812, most famously where he won a decisive victory over the main British invasion army at the Battle of New Orleans. In response to conflict with the Seminole in Spanish Florida, Jackson invaded the territory in 1818. This led directly to the Adams–Onís Treaty, which formally transferred Florida from Spain to the United States.