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 colony against British incursions. He repulsed the British at San Fernando de Omoa, and captured several 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 was captured by a British expedition led by Horatio Nelson. The British 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 two months later.