Texas effectively became an independent country when it began the Texas Revolution on October 2, 1835. According to the Lone Star Junction website, the country formally signed a Declaration of Independence on March 2, 1836 to establish the Republic of Texas.
The Republic of Texas persisted as an independent country for nine years before it became part of the United States. The annexation process took so long because of divided political opinions both in Texas and in the U.S. Some Texans wanted to remain independent, extending their power over the vast range of land west toward the Pacific Ocean. In the United States, many people viewed the addition of a new slave state with distaste; they wanted to balance its entry into the union with that of a free state. Finally, though, President Polk signed legislation incorporating the fledgling country on December 29, 1845.