Martín de Mayorga Ferrer (September 12, 1721 in Barcelona, Spain – 1783 in Spain) was a Spanish military officer, governor of the Captaincy General of Guatemala (from June 1773 to 1779), and interim viceroy of New Spain (from August 23, 1779 to April 28, 1783).
Martín de Mayorga Ferrer was a field marshal in the royal army of Spain, and a knight of the military Order of Alcántara. He was governor, president of the Audiencia and captain general of Guatemala at the time of the devastating 1773 Guatemala earthquake on July 29, 1773.
He was still serving in those positions at the time of the death of New Spain Viceroy Antonio María de Bucareli y Ursúa in Mexico City. When the Audiencia of Mexico opened the sealed instructions in the event of the death of Bucareli, they found that the captain general of Guatemala was named as replacement. When the instructions had been written, this was expected to be Matías de Gálvez y Gallardo, brother of José de Gálvez, minister of the Indies. However, Gálvez, although appointed to the position, had not yet arrived to fill it. The Audiencia of Mexico, therefore, named Marshal Martín de Mayorga, who still held the position, viceroy of New Spain.
Mayorga arrived in Mexico City August 23, 1779, and took up his new position. Of immediate concern were preparations for defense in the war that France and Spain had recently declared on England. He greatly reinforced Havana, took extra precautions at Veracruz, and sent an expedition under Bernardo de Gálvez to Florida to aid the English colonists in their revolution against England. There was also fighting with the English in Belize.