After the Spanish conquest of Yucatán, the Peninsula was a single administrative and political entity, the Captaincy General of Yucatán. Following independence and the breakup of the Mexican Empire in 1823, the first Republic of Yucatán was proclaimed, which was then voluntarily annexed to the Federal Republic of United Mexican States on December 21, 1823. On March 16, 1841, as a result of cultural and political conflicts around the federal pact, Yucatán declared its independence from Mexico. forming a second Republic of Yucatán. Eventually on July 14, 1848, Yucatán was forced to rejoin Mexico. In 1858, in the middle of the caste war, the state of Yucatán was divided for the first time, establishing Campeche as a separate state (officially in 1863). During the Porfiriato, in 1902, the state of Yucatán was divided again to form the Federal territory that later became the present state of Quintana Roo.