In 1836, after a deadly war, the Texans successfully gained independence from Mexico and formed the Lone Star Republic. Initially the Texans approached the Union with the hopes of being admitted as a slave state, but the delicate balance in congress between slave and free states would be disturbed by doing so. For this reason, the Lone Star Republic would remain independent for another decade. Forging valuable trade relationships with European and Americans, as well as building its economy, Texas would opt to join the Union once again. This time the year was 1845, and the vast majority of Texans would agree to join the Union.
After nearly a decade operating as an independent nation that was recognized by foreign powers such as the US, Britain, and France, Texas was now free to join the Union as it had originally intended to in 1836. However, despite having been recognized as a sovereign nation for nearly a decade, the Mexican government would not agree with the Texan intent of joining the Union. As far as the Mexican government was concerned, Texas was still a territory of Mexico, and would remain such. This is despite the fact that the Lone Star Republic clearly claimed independence nearly a decade earlier. And the Mexican troops made their desire to keep Texas quite evident.