Houston lived for a time with the Cherokee and became a popular hero as a result of his exploits, while serving under Andrew Jackson, against the Creek in 1814. In 1835–36, as military leader of the Texan insurgents, he defeated and captured Santa Anna at the Battle of San Jacinto, thus securing Texan independence. He was twice President of the Texan Republic (1836–38; 1841–44), and after Texas joined the United States served in the Senate from 1847 to 1859. In 1859 his popularity won him election as governor of his adopted state, but when Texas joined the Confederacy in 1861, Houston was deposed.