as the Spanish commander of the fort allowed Álvarez' forces to get close to the fort before firing upon them. Most of Álvarez' men died and Álvarez himself was injured in both legs, but was saved by the soldier Diego Eugenio Salas who carried him to safety despite being injured himself. Amidst the fighting he lost his home and his wealth which amounted to thirty-five pesos, and he had to live off of the land, but he kept the fight against the Spaniards and earned the nom du guerre Gallego. In 1821, he joined the Agustin de Iturbide's Trigarantine Army, and led a siege of Acapulco with three hundred men until finally taking possession of the port on October 15. After independence was won, he asked the government for permission to retire but it was denied, and instead was tasked with commanding the Acapulco fortress. First Mexican Republic At the end of 1822 when Vicente Guerrero and Nicolás Bravo proclaimed against the First Mexican Empire, Álvarez joined them, and upon the adoption of the Constitution of 1824, he joined the moderate republican party. He was opposed to the Plan of Jalapa which sought to overthrow president Vicente Guerrero, and fought for him, though President Guerrero was eventually overthrown. He fought against the conservative revolt against the liberal administration of Valentín Gómez Farías in May, 1833, and once Gómez Farías had been overthrown by Santa Anna, Álvarez raised up the south against him, but his movement failed and he was sentenced to be banished, a sentence that was later commuted for peacefully diffusing another revolt in Acapulco. Centralist Republic of Mexico He offered his services to the government against the French during the Pastry War of 1838, and having taken part in the revolt against Anastasio Bustamante in 1841, the triumphant Santa Anna promoted Álvarez to division general. He suppressed Indian uprisings in the mountains of Chilapa and the Tierra Caliente, insurgencies which tended to take on the characteristics of ethnic conflicts. He fought in the Mexican-American War though played no notable role. During the conflict he was made commandant general of Puebla and harassed the American occupiers. He contributed to the establishment of the State of Guerrero in the south of the country and was its first governor. He fought against the Plan of Jalisco which overthrew President Mariano Arista and paved the way for the return of Santa Anna