vote, Polk beat Clay by fewer than 40,000 votes, a margin of 1.4%. James G. Birney of the anti-slavery Liberty Party won 2.3% of the vote. As President, Polk completed American annexation of Texas, which was the proximate cause of the Mexican–American War. Background Gag rule and Texas annexation controversies Whigs and Democrats embarked upon their campaigns during the climax of the congressional gag rule controversies in 1844, which prompted Southern congressmen to suppress northern petitions to end the slave trade in the District of Columbia. Anti-annexation petitions to Congress sent from northern anti-slavery forces, including state legislatures, were similarly suppressed. Intra-party sectional compromises and maneuvering on slavery politics during these divisive debates placed significant strain on the northern and southern wings that comprised each political organization. The question as to whether the institution of slavery and its aristocratic principles of social authority were compatible with democratic republicanism was becoming "a permanent issue in national politics". In 1836, a portion of the Mexican state of Coahuila y Tejas declared its independence to form the Republic of Texas. Texans, mostly American immigrants from the Deep South, many of whom owned slaves, sought to bring their republic into the Union as a state. At first, the subject of annexing Texas to the United States was shunned by both major American political parties. Although they recognized Texas sovereignty, Presidents Andrew Jackson (1829–1837) and Martin Van Buren (1837–1841) declined to pursue annexation. The prospect of bringing another slave state into the Union was fraught with problems. Both major parties – the Democrats and Whigs – viewed Texas statehood as something "not worth a foreign war [with Mexico]" or the "sectional combat" that annexation would provoke in the United States. Tyler–Texas treaty The incumbent President John Tyler, formerly vice-president, had assumed the presidency upon the death of William Henry Harrison in 1841. Tyler, a Whig in name only, emerged as a states' rights advocate committed to slavery expansion in defiance of Whig principles. After he vetoed the Whig domestic legislative agenda, he was expelled from his own party on September 13, 1841. Politically isolated, but unencumbered by party restraints, Tyler aligned himself with a small faction of Texas annexationists in a bid for election to a full term in 1844. Tyler became convinced that Great Britain was encouraging a Texas–Mexico rapprochement that might lead to slave emancipation in the Texas republic. Accordingly, he directed Secretary