Elected as a Democrat in the 1850 congressional elections, he switched to the newly-organized Republican Party in the mid-1850s when the Democratic Party refused to prohibit the extension of slavery into western territories.