On August 22, 1846, Mexican interim president José Mariano Salas restored the 1824 constitution and the federalism. Two years later, during the government of president José Joaquín de Herrera, Miguel Barbachano ordered the reinstatement of Yucatán to Mexico under the Constitution of Yucatán of 1825. A decisive factor for the reinstatement was the Caste War, which forced Yucatán to seek outside help. In 1852 due to internal struggles between opposing political factions, was created the "Territory of Campeche". On April 29, 1863, during the government of Benito Juárez, Campeche gained its current status as an independent state.