Born in Hodgenville, Kentucky, Lincoln grew up on the western frontier in Kentucky and Indiana. Largely self-educated, he became a lawyer in Illinois, a Whig Party leader, and was elected to the Illinois House of Representatives, in which he served for eight years. Elected to the United States House of Representatives in 1846, Lincoln promoted rapid modernization of the economy and opposed the Mexican–American War. After a single term, he returned to Illinois and resumed his successful law practice. Reentering politics in 1854, he became a leader in building the new Republican Party, which had a statewide majority in Illinois. As part of the 1858 campaign for US Senator from Illinois, Lincoln took part in a series of highly publicized debates with his opponent and rival, Democrat Stephen A. Douglas; Lincoln spoke out against the expansion of slavery, but lost the race to Douglas. In 1860, Lincoln secured the Republican Party presidential nomination as a moderate from a swing state, though most delegates originally favored other candidates. Though he gained very little support in the slaveholding states of the South, he swept the North and was elected president in 1860.