During the century, the capital city was the scene of a number of important events. During the Mexican–American War, the capital was moved from Mexico City to Querétaro. At the end of that war, the Treaty of Guadalupe Hidalgo was signed here. The southernmost raids of the Comanche Indians from the plains and prairies of Texas, Oklahoma, and Kansas far to the north (along with Kiowas and some Apaches) occurred here during the middle of the 1800s. The 1857 Constitution was published in the city as well and a coalition of states including Querétaro, Jalisco, Aguascalientes, Zacatecas, Guanajuato and Michoacán formed a coalition to defend this constitution against the Plan of Tacubaya. During the short reign of Maximilian I, there were battles between Liberals and Conservatives (with the latter supporting the emperor) in Querétaro. However, Maximilian lost the military support provided by Napoleon III, leaving only four states loyal to the emperor. Querétaro was one of them. Maximilian still resisted Liberal forces which eventually surrounded him at Cerro de Campanas, then outside the city of Querétaro. The emperor was caught and executed on 19 June 1867. Afterwards, the state wrote a new constitution based on Liberal principles. Another new state constitution would be written at the beginning of the Porfiriato in 1879. Despite the turmoil, there was still economic progress in the state, with the establishment of textile mills such as Hércules, Casa Rubio and two other factories in San Antonio and La Purísma. There was also some mining, especially in El Doctor, Río Blando, Maconí and Escanelilla with a total of 216 mines producing silver with some producing gold, copper, lead and more.