Mexican Texas is the historiographical name used to refer to the era of Texan history between 1821 and 1836, when it was part of Mexico. Mexico gained independence in 1821 after winning its war against Spain, which began in 1810. Initially, Mexican Texas operated similarly to Spanish Texas. Ratification of the 1824 Constitution of Mexico created a federal structure, and the province of Tejas was joined with the province of Coahuila to form the state of Coahuila y Tejas.