The Republic of Texas won independence from Mexico in 1836, but it did not immediately join the United States. President John Tyler sought to change this, so he opened statehood negotiations with the Texas government. On April 12, 1844, they signed the Treaty of Annexation. Once Mexico learned of the treaty, they cut off all diplomatic ties with the United States. Nevertheless, this attempt at annexation was voted down by the Senate (likely due to the question of whether or not Texas would be a slave or a free state), although the United States successfully annexed Texas in 1845.
Under the terms of the Treaty of Annexation, Texas would assimilate into the United States as quickly as possible. All Texan territory would become subject to the U.S. government, and the United States would assume all of Texas' debts. Finally, most of the Texan government would remain intact during the transitional period, although the president, vice-president, and all executive department heads would step down.