Texas became a republic in 1836 and voted in favor of annexation immediately after winning their independence from Mexico. However, all attempts at formalizing an annexation treaty failed. U.S. President Martin Van Buren was against annexation because of Texas's pro-slavery policies. Texas withdrew the offer in 1838.
The British Empire was opposed to the United States annexing Texas. The British saw Texas remaining a republic a prevention against any further U.S. westward expansion. They also sought to establish commercial trade in the area. President John Tyler was alarmed by the relationship that was forming between England and Texas and reopened the issue of annexation.
The debate continued until President James K. Polk, who favored annexation, took office. He offered Texas statehood under certain conditions. Mexico and Britain attempted to prevent annexation by recognizing Texas as an independent republic. Texas was given the choice of independence or annexation and chose statehood. It legally entered the Union on December 29, 1845.