Matías de Gálvez y Gallardo was born in Macharaviaya, a small village in the Spanish region of Andalusia near Málaga. He joined the army and distinguished himself on campaign. He rose in rank to general, and because of his military record and the influence of his brother, José de Gálvez, an important administrator in New Spain, he became well known at Court. He married María Josefa de Madrid and they had two sons, Bernardo and José. José died at 8. Sealed instructions from the Crown intended to be opened in the event of the death of Viceroy Antonio María de Bucareli y Ursúa specified that he be succeeded by the captain general of Guatemala. These instructions were inserted by José de Gálvez, minister of the Indies and former visitador in New Spain, in anticipation that they would apply to his brother, Matías de Gálvez, but no name was given in the instructions. Matías de Gálvez was named captain general, governor and president of the Audiencia of Guatemala in April 1779, just before Viceroy Bucareli died. However, Gálvez had not yet arrived in the colony to take up his positions. Thus the viceroyalty was turned over to Martín de Mayorga, who was then serving as captain general of Guatemala.
Rule of Guatemala
In Guatemala, Gálvez showed himself an active administrator and a good organizer. He worked to reconstruct Guatemala City after the earthquake of 1773, established a mint and built the cathedral. When Spain entered the Anglo-Spanish War as an opponent of Great Britain in 1779, he became involved in defending the colonial territories against British attacks. He repulsed the English at San Fernando de Omoa, and won victories against British positions in Belize in 1779. Because of the distance and the scarcity of resources, he was not able to aid Fort San Juan, Nicaragua, which fell to an English expedition led by Horatio Nelson. The English were forced to abandon it on January 5, 1781, after their forces were decimated by tropical diseases. In March 1782 Gálvez led an expedition along the Caribbean coast that captured the island of Roatán and scattered the British settlement at Black River, although the later was retaken by the British settlers two months later. Viceroy Mayorga had been trying to resign to return to Spain for several years. In 1783 King Charles III accepted his resignation. To reward Gálvez for his service in Guatemala, the king named him viceroy of New Spain, in spite of his age and ill health. He traveled overland to the capital, passing through Oaxaca and Puebla. Matías de Gálvez was the last viceroy to make his formal entry into Mexico City on horseback, which he did on April 28, 1783.
Rule of New Spain
Spain and England had just made peace, and Gálvez was able to dedicate himself to improving the capital. During his brief administration, he worked to clean the waterways and drain the lake surround Mexico City, built bridges and a sewage system, and paved the streets of La Palma, Monterilla and San Francisco with cobblestones. He divided Mexico City into four quarters, and improved the police service. He approved the San Carlos academy of fine arts founded by his predecessor, and continued work on it. He dedicated 15,000 pesos annual for this project. He also ordered the reconstruction of the palace of Chapultepec. He organized the Banco Nacional de San Carlos, a subsidiary of a Spanish bank. He tried to import mercury from China, in exchange for furs. He founded a pawn shop. He also increased government revenues to 19 million pesos annually. On November 13, 1783 he granted permission to Manuel Antonio Valdés Murguía y Saldaña to restart the newspaper La Gaceta de México. This was the third incarnation of this "national" newspaper, first started in 1722 by Juan Ignacio María de Castorena Ursúa y Goyeneche, revived by Juan Francisco Sahagún de Arévalo y Ladrón de Guevara in 1728, but suspended since 1742. Valdés was not allowed to publish news not originating from the government. He took a census of coaches in Mexico City. He established mutual aid societies for the indigenous population. He ordered the collection and preservation of more papers relevant to the history of New Spain. He intended these as reference material for a projected Historia General de las Indias, which he had been working on in Madrid and Seville.
Death
Matías de Gálvez died November 3, 1784, in Mexico City. Shortly before, on October 20, 1784, he turned government functions over to the Audiencia. There were no sealed instructions to be opened on the event of his death, and the Audiencia turned over the administration to Vicente Herrera until the arrival of a new viceroy. In his will, Gálvez had asked that his funeral services be simple. He was interred in the church of the Apostolic College of San Fernando, with due regard for his rank and the services he had rendered the colony. His son Bernardo de Gálvez, Spanish governor of Louisiana, succeeded him as viceroy.