After Andrew Jackson defeated Adams in the 1828 presidential election, Webster became a leading opponent of Jackson's domestic policies. He strongly objected to the theory of nullification espoused by John C. Calhoun, and his "Second Reply to Hayne" speech is widely regarded as one of the greatest speeches ever delivered in Congress. Webster supported Jackson's defiant response to the Nullification Crisis, but broke with the president due to disagreements over the Second Bank of the United States. Webster joined with other Jackson opponents in forming the Whig Party, and unsuccessfully ran in the 1836 presidential election. He supported Harrison in the 1840 presidential election and was appointed secretary of state after Harrison took office. Unlike the other members of Harrison's Cabinet, he continued to serve under President Tyler after Tyler broke with congressional Whigs. As secretary of state, Webster negotiated the Webster–Ashburton Treaty, which settled border disputes with Britain.