<P> The Republic of Texas declared independence from the Republic of Mexico on March 2, 1836 . At the time the vast majority of the Texian population favored the annexation of the Republic by the United States . The leadership of both major U.S. political parties, the Democrats and the Whigs, opposed the introduction of Texas, a vast slave - holding region, into the volatile political climate of the pro - and anti-slavery sectional controversies in Congress . Moreover, they wished to avoid a war with Mexico, whose government refused to acknowledge the sovereignty of its rebellious northern province . With Texas's economic fortunes declining by the early 1840s, the President of the Texas Republic, Sam Houston, arranged talks with Mexico to explore the possibility of securing official recognition of independence, with the United Kingdom mediating . </P> <P> In 1843, U.S. President John Tyler, then unaligned with any political party, decided independently to pursue the annexation of Texas in a bid to gain a base of popular support for another four years in office . His official motivation was to outmaneuver suspected diplomatic efforts by the British government for emancipation of slaves in Texas, which would undermine slavery in the United States . Through secret negotiations with the Houston administration, Tyler secured a treaty of annexation in April 1844 . When the documents were submitted to the U.S. Senate for ratification, the details of the terms of annexation became public and the question of acquiring Texas took center stage in the presidential election of 1844 . Pro-Texas - annexation southern Democratic delegates denied their anti-annexation leader Martin Van Buren the nomination at their party's convention in May 1844 . In alliance with pro-expansion northern Democratic colleagues, they secured the nomination of James K. Polk, who ran on a pro-Texas Manifest Destiny platform . </P> <P> In June 1844, the Senate, with its Whig majority, soundly rejected the Tyler--Texas treaty . The pro-annexation Democrat Polk narrowly defeated anti-annexation Whig Henry Clay in the 1844 presidential election . In December 1844, lame - duck President Tyler called on Congress to pass his treaty by simple majorities in each house . The Democratic - dominated House of Representatives complied with his request by passing an amended bill expanding on the pro-slavery provisions of the Tyler treaty . The Senate narrowly passed a compromise version of the House bill (by the vote of the minority Democrats and several southern Whigs), designed to provide the incoming President - elect Polk the options of immediate annexation of Texas or new talks to revise the annexation terms of the House - amended bill . </P> <P> On March 1, 1845, President Tyler signed the annexation bill, and on March 3 (his last day in office), he forwarded the House version to Texas, offering immediate annexation (which preempted Polk). When Polk took office the next day, he encouraged Texas to accept the Tyler offer . Texas ratified the agreement with popular approval from Texans . The bill was signed by Polk on December 29, 1845, accepting Texas as the 28th state of the Union . Texas formally relinquished its sovereignty to the United States on February 19, 1846 . Following the annexation, relations between the United States and Mexico deteriorated due to an unresolved dispute over the border between Texas and Mexico, and the Mexican - American War broke out only a few months later . </P>

Who was president during the annexation of texas