The 1824 presidential election was contested by Adams, Andrew Jackson, William H. Crawford, and Henry Clay, all of whom were members of the Democratic-Republican Party. As no candidate won a majority of the electoral vote, the House of Representatives held a contingent election to determine the president, and Adams won that contingent election with the support of Clay. He joined the Anti-Masonic Party in the early 1830s before becoming a member of the Whig Party, which united those opposed to President Jackson. During his time in Congress, Adams became increasingly critical of slavery and of the Southern leaders whom he believed controlled the Democratic Party.