Until 1835/36 Texas was a part of Mexico. Esp. because of tensions between the Texans and the Mexican central government war broke out. The Texans prevailed and formed the independent Republic of Texas, a necessary precondition for joining the Union ten years later.