# Casto Méndez Núñez

Casto Secundino María Méndez Núñez (1 July 1824 – 21 August 1869) was a Spanish Navy officer. He served in the First Italian War of Independence in Italy in 1849, the Spanish-Moro Conflict in the Philippines in 1861, and the Dominican Restoration War in the Caribbean in 1863–1864. Rising to the rank of contralmirante (counter admiral) he achieved international renown for his command of the Spanish Navy's Pacific Squadron during the Chincha Islands War in 1865–1866, becoming one of the major Spanish naval figures of the nineteenth century. In Spain, he is a popular hero, viewed as an exemplification of good character and Spanish patriotism.

## Biography
### Early life

Méndez Núñez was born in a house on the Plaza de la Constitución in Vigo, Spain, on 1 July 1824. His father was a postal worker. His mother, Tomasa Núñez Fernández, was a member of an old Vigo family which included a number of sailors, and her father, Joaquín Núñez Falcon, had completed his stint as a midshipman in 1785 and rose to the rank of brigadier in the Spanish Navy in 1825.
Méndez Núñez spent his early years in Madrid, but returned to Vigo at the age of 10 and studied at the Colegio de Humanidades (College of the Humanities), where his renowned professor, Elías Pérez Martínez, regarded Méndez Núñez as one of his most brilliant students. Méndez Núñez completed his training at the Nautical School in Vigo. A story exists that as a boy Méndez Núñez saved two children from drowning on the beach at Arenal d'en Castell on Menorca in the Balearic Islands and that an old sea captain who witnessed the rescue told him, "You will be a great man."
After completing his studies at the Nautical School, Méndez Núñez went to Cádiz to take the naval entrance exams, which he passed. He was granted the right to wear the uniform of a guardiamarina (midshipman) on 1 February 1839.

### Naval career
#### 1840–1857

Méndez Núñez took up his post as a Spanish Navy midshipman on 24 March 1840 and remained at Cádiz until 4 September 1840, then reported aboard the 14-gun brig Nervión at Pasajes on 5 November 1840. In 1842 took part in an expedition to Fernando Po off the coast of Africa and distinguished himself so much by his superior performance during he Spanish occupation of the island in 1843 that his eligibiity for promotion was accelerated by a year. Operating along the coast of North Africa, he was promoted to guardiamarina de 1º (first midshipman) and reported aboard the paddle gunboat Isabel II. In April 1846 he was commissioned as an officer after passing another exam, and on 11 July 1846 he was promoted to the rank of alférez de navío (ship-of-the-line ensign), the lower of the Spanish Navy's two ensign ranks.
Méndez Núñez reported to the new 12-gun brig Volador on 31 July 1846 and was named officer in command of the four midshipmen aboard. Volador departed Cádiz on 10 October 1846 to deliver documents to Montevideo, Uruguay. In March 1848 Volador headed for Rio de Janeiro and in June 1848 departed Rio de Janeiro bound for Cádiz, which she reached on 1 August 1848. On 7 January 1849 she put to sea from Barcelona to transport Spanish Army troops to Italy as part of an expedition to protect the Papal States during the First Italian War of Independence. Once the threat to the Papal States had abated, the expedition got back underway on 4 May 1849, participated in the capture of Terracina, then carried out maneuvers as a show of force at Naples, Gaeta, and Porto D'Auro which helped bring the war to an end. On 18 May Méndez Núñez disembarked at Gaeta and on 29 May Pope Pius IX reviewed members of the Spanish expedition, who displayed for him enemy flags they had captured, and he blessed the Spaniards and gave them thanks by royal order. Pius IX made Méndez Núñez and the other officers of the expedition Commanders of the Cross of the Order of St. Gregory the Great. Volador subsequently returned to Spain at Cádiz.
Volador arrived at Málaga in early 1850 and became part of the Training Squadron, subsequently cruising between Cape Rosas and Málaga. By a Royal Order of 19 November 1950, Méndez Núñez received a promotion to teniente de navío (ship-of-the-line lieutenant). He became commanding officer of the seven-gun schooner Cruz on 14 April 1851. Under his command, Cruz patrolled the southern coast of Spain to prevent the smuggling of arms into the country. Although Cruz was in need of repairs and scheduled for drydocking, Méndez Núñez received orders to carry documents to Havana in the Captaincy General of Cuba, and got underway from Cádiz on 8 February 1852. Méndez Núñez displayed great seamanship in command during what turned out to be a risky and exhausting voyage, and Cruz avoided serious damage.
In 1853, Méndez Núñez took command of the two-gun paddle gunboat Narváez, which still was under construction at the Reales Astilleros de Esteiro at Ferrol. He received orders in January for Narvaez to proceed to Cádiz in January, but after she put to sea he found that she was unseaworthy due to her poor overall condition, including much rotten wood in her hull, forcing him to return to Ferrol, where Narvaez was scrapped. He subsequently saw service with the Spanish coast guard. Shore duty at the Ministry of the Navy followed, during which he translated into Spanish the 1820 book A Treatise on Naval Gunnery by the British Army officer Howard Douglas. His translation was published in 1857.

#### Philippines, 1858–1862

In 1858 Méndez Núñez became the commanding officer of another warship named Narváez, this one a screw corvette which, like the previous Narvaez, was under construction when he took command, also at the Reales Astilleros de Esteiro at Ferrol, and used the same steam engine that had been installed on the previous Narvaez. Narvaez was commissioned on 20 November 1858. She departed Cádiz on 10 February 1859, rounded the Cape of Good Hope, and headed for the Philippines in the Spanish East Indies, stopping along the coast of Luzon on 21 June before arriving at Manila on 26 June 1859, completing the passage in four months and eleven days. On the Philippines station, Méndez Núñez took command of the paddle gunboat Jorge Juan. Under his command, Jorge Juan was off Basilan on 21 August 1860 when she sank five armed boats manned by Moro pirates from Jolo that were headed to the Visayas, took the survivors prisoner, and handed them over to Spanish authorities at Cavite.
Méndez Núñez was promoted to capitán de fragata (frigate captain) on 3 May 1861 and given command of both the schooner Constancia and the Spanish naval division in the southern Philippine Islands. He raised his flag aboard Constancia. His first operation after his promotion was against the Sultanate of Buayan, which was in rebellion against Spain. The Sultan was based alongside the Rio Grande de Mindanao at Pagalungan on the southwestern coast of Mindanao in a well-garrisoned and well-equipped fort manned by about 500 men, surrounded by a wall 7 metres (23 ft) high and 6 metres (20 ft) thick as well as a deep, 15-metre (49 ft) wide moat and a mangrove swamp, and armed with short-range guns, including four large-caliber artillery pieces and a number of smaller guns known as lantakas.
Arriving on the scene with his entire division — Constancia, the schooner Valiente, the gunboats Arayat No. 12, Luzón No. 5, Pampanga No. 13, and Taal No. 18, six faluas, three merchant ships serving as transports, and a landing force of 850 Spanish Army and indigenous troops organized into four companies of infantry and an artillery battery of four guns — Méndez Núñez ordered the fort to surrender. It refused, so he disembarked the landing force to attack the fort on 16 November 1861, but the men sank up to their knees in the marshy ground around the fort, making an assault likely to result in high casualties, and he withdrew them. As dawn broke at 04:30 on 17 November he launched a second attack, with the landing force supported by gunfire from Arayat and Pampanga, and the Spanish troops reached firmer ground, albeit at a greater distance from the fort, and managed to emplace several artillery pieces ashore. When that attack stalled and the Spanish Army commander ordered a retreat amid increasing casualties, Méndez Núñez, who had come ashore to assess the situation, responded "The Navy is not retreating!", a phrase which became legendary in the Spanish Navy. He ordered small boats to reconnoitre the fort under enemy fire, then, having chosen a point of attack, maneuvered Constancia — which Moro artillery hit six times — through the mangrove swamp and brought her alongside the fort. He introduced Constancia′s bowsprit into one of the fort's gun ports, bringing her to rest at an angle of about 60 degrees from the fort's wall. The Spaniards laid wooden planks from the ship's side onto the fort's structure, and he sent an assault force into the fort across the bowsprit and planks at 08:15 as if boarding a ship. The disembarked landing force renewed its attack at the same time. After 15 minutes of hand-to-hand fighting, the fort's defenders began to retreat at 08:30 and attempted to take shelter within the fort. However, the swivel gun on Constancia′s bow could bear on the area they retreated to, and they came under heavy fire by shrapnel shells from the gun and rifles. Two hours after the action began, the fort fell to the Spaniards with heavy casualties among its Moro defenders; the Spaniards found 136 bodies in and around the fort and estimated that up to 200 Moros had been killed. In exchange, the Spaniards suffered 18 killed, 98 wounded, and nine injured due to non-combat causes, a total of 14.7 percent of the expeditionary force. Deeming it impractical to garrison the captured fort, the Spaniards demolished it down to its foundations with explosives and withdrew.
Méndez Núñez's innovation of "boarding" the fort as if boarding a ship probably is a unique event in military history, according to the Spanish historian Agustín Ramón Rodríguez González, and was viewed as having rescued the expedition from near-disaster and made possible a notable victory. For this feat of arms, during which he suffered a bullet wound to the head and two stab wounds, Méndez Núñez was promoted to capitán de navío (ship-of-the-line captain) in January 1862 — his second promotion in less than a year — and recalled to Spain. He arrived at Cádiz on 2 July 1862.

#### Caribbean, 1862–1864

In October 1862, Méndez Núñez was ordered to command of the paddle gunboat Isabel II, on which he had once served, and he took command of her on 1 November 1862. She got underway on 14 November and arrived at Havana on 8 December 1862. From January to March 1863 Isabel II carried out patrols along the coast of Cuba to interdict the flow of arms and other contraband onto the island. During political unrest in Venezuela, he left Havana on 23 May 1863 bound for Puerto Cabello and La Guaira. Upon arriving at Puerto Cabello, local authorities informed him that the port was blockaded, but Méndez Núñez took the position that no recognized government existed in Venezuela, and on that basis ignored the local authorities and entered the harbor, where Isabel II landed a Spanish Marine Infantry force which protected all foreign diplomatic representatives, citizens, and property. He personally negotiated an agreement under which no one opened fire. On 29 June 1863, he departed La Guaira to transport the chargé d'affaires of the United Kingdom and Spain and Venezuelan General José Antonio Páez to Puerto Cabello to sign the agreement, which took effect a few days later. For engaging in diplomacy that prevented bloodshed and defused the crisis in Venezuela, he received the thanks of the Commander General of Havana and the Government of Spain.
After departing Venezuela, Méndez Núñez stopped at San Juan, Puerto Rico, and Santo Domingo before arriving at Santiago de Cuba on the southeastern coast of Cuba, where Isabel II took on coal and dropped off a schooner captured in Santo Domingo. Receiving word that the Dominican Restoration War had broken out on Santo Domingo, he brought 650 Spanish Army troops, a battery of horse artillery, mules, and 19 horses and put to sea. Isabel II arrived at Puerto Plata on the moonless evening of 27 August 1863, where a maritime pilot informed Méndez Núñez that 200 Spaniards were holding out in a fort under siege by 2,000 rebels who planned to attack at dawn. Isabel II picked her way through uncharted shallows, anchored at 22:00, and completed disembarkation of the troops at 01:30 on 28 August. The Spaniards attacked the rebels at 02:00, taking them completely by surprise and quickly scattering them, relieving the fort.
On 1 January 1864, Méndez Núñez returned to Havana, where Isabel II was scheduled to undergo an overhaul. Leaving Isabel II, he took command of the screw frigate Princesa de Asturias on 22 January 1864and returned to action off Santo Domingo aboard her, establishing a blockade of Manzanillo and Monte Chisti. After returning to Havana, he relinquished command of Princesa de Asturias on 9 August 1864.

#### Numancia, 1864–1865

A few days after leaving Princesa de Asturias, Méndez Núñez boarded the mail steamer Paris at Havana for passage to Spain. After arriving, he took up duties as the director of personnel of the Ministry of the Navy. During this duty, he developed an aversion to politics and a distaste for military officers who left their profession to pursue political careers.
By royal decree, Méndez Núñez was given of command of Spain's first ironclad warship, the armoured frigate Numancia, at the beginning of December 1864. He assumed command on 24 December, a week after she was commissioned. After her arrival from her construction yard in Toulon, France, Numancia had her guns mounted at the Arsenal de Cartagena in Cartagena, where her full crew reported aboard. She got underway from Cartagena on 8 January 1865 bound for the Arsenal de La Carraca at San Fernando, which she reached on the morning of 11 January. There she completed preparations for a deployment to the southeastern Pacific Ocean, where the commander of the Spanish Navy's Pacific Squadron, Luis Hernández-Pinzón Álvarez, had seized the Chincha Islands from Peru in April 1864 in response to various incidents between Spain and Peru, precipitating a crisis between the countries.
At Cádiz, she prepared for a lengthy deployment, and was overloaded with as much coal and gunpowder and as many projectiles and provisions as she could carry. This increased her draft to 9.96 metres (32 ft 8 in) at the stern and 8.36 metres (27 ft 5 in) at the bow, and her displacement rose to 7,700 tons.
Numancia resumed her voyage at 16:00 on 4 February 1865, departing Cádiz with four boilers lit and carrying provisions for six months, 1,160 tons of coal, gunpowder and projectiles, and a crew of 590 men. The pilot disembarked at 18:00 and she set course for the Cape Verde Islands in good weather with a fresh northwesterly breeze. As she neared the islands, she encountered a storm on 12 February with high waves that struck her broadside, causing her to roll up to 53 degrees, from gunwale to gunwale, submerging her freeboard. She nonetheless weathered the storm without great difficulty and arrived safely at São Vicente in the Cape Verde Islands on 13 February. Ironclad warships were new in the navies of the world in the 1860s: French and British ironclads had experienced great difficulty when encountering bad weather, and foreign navies took note of Méndez Núñez′s seamanship in what they viewed as an historic demonstration of the seaworthiness of armoured warships.
After refilling her coal bunkers, Numancia got back underway on 16 February 1865 to begin a transatlantic voyage, initially encountering calm weather in which she made 4 knots (7.4 km/h; 4.6 mph) under sail in light winds after turning off her engine. On 13 March 1865 she arrived at Montevideo, Uruguay, where she met the brigantine Galiano, the screw corvette Wad-Ras, and the transport steamer Marqués de la Victoria. Numancia and Marqués de la Victoria got underway from Montevideo on 2 April 1865, Numancia exchanging 13-gun salutes with foreign warships in the harbor, and proceeded in company to the Strait of Magellan, which they entered on 11 April 1865. After anchoring on the northern shore of the strait at Puerto del Hambre on 19 April so that Numancia could coal from Marqués de la Victoria, they resumed their voyage on the morning of 19 April, and at 10:00 passed Santa Agueda Hill, which lies at both the southernmost tip of the mainland of South America and the southern end of the Andes. After they anchored for the night at Fortescue Bay, a warship flying no flag approached, and, given the political tensions in the area, Numancia prepared for action, her crew manning battle stations and loading her guns. The warship hoisted the Peruvian flag and the Spaniards recognized her as the Peruvian Navy corvette America, which was making her delivery voyage from the United Kingdom to Peru as Peru armed itself for a possible war with Spain. America passed close to Numancia′s bow and anchored off her starboard beam.
America weighed anchor and departed very early on the morning of 20 April 1865, Numancia following at 07:00 and proceeding with eight boilers lit at full speed in company with Marqués de la Victoria. She sighted Cape Pilares at the western end of the Straight of Magellan at 17:00, and by 18:00 was in the Pacific Ocean, having completed her transit of the strait in ten days. She sighted America trailing behind her, but America soon had to move farther out to sea to avoid excessive rolling. Numancia had no such problems, and on 21 April she turned off her engine and proceeded under sail the rest of the way to Valparaíso, Chile, which she and Marqués de la Victoria reached on 28 April 1865. Méndez Núñez gathered information from the commanding officer of the screw corvette Vencedora, learning that Pinzon's successor as Pacific Squadron commander, Vicealmirante (Vice Admiral) José Manuel Pareja, had signed the Vivanco–Pareja Treaty with the Peruvian government in January 1865, avoiding a war,. and that the Pacific Squadron was at Callao, Peru. Numancia and Marqués de la Victoria got back underway and made a seven-day voyage to Callao, anchoring there and joining Pareja′s squadron at 11:00 on 5 May 1865 after Numancia exchanged gun salutes with the Pacific Squadron flagship, the screw frigate Villa de Madrid. Numancia′s 90-day voyage from Cádiz to Callao — during which she had spent 60 days at sea and 30 days in port, traveled 9,000 nautical miles (17,000 km; 10,000 mi), consumed 2,800 tons of coal, and suffered only one death, that of a crewman swept overboard and lost — was an unprecedented one for an ironclad warship of any navy, and Méndez Núñez received a promotion to contralmirante (counter admiral) on 20 June 1865.

#### Chincha Islands War

The Vivanco–Pareja Treaty was unsuccessful; the Peruvian Congress viewed it as a humiliation and rejected it, prompting the outbreak of the Peruvian Civil War of 1865. The political situation in the southeastern Pacific region further deteriorated during 1865 when Pareja steamed to Valparaíso to settle Spanish claims with Chile. When Chile refused to settle, Pareja announced a blockade of Chilean ports, and the Chincha Islands War broke out between Spain and Chile on 24 September 1865. The blockade spread the Pacific Squadron thinly along the Chilean coast, and early setbacks in the war culminated in a humiliating Spanish naval defeat in the Battle of Papudo on 26 November 1865 in which the Chilean Navy screw corvette Esmeralda captured the Spanish Navy schooner Virgen de Covadonga. News of the defeat prompted Pareja to commit suicide aboard Villa de Madrid off Valparaíso, shooting himself in his cabin on 28 November 1865 while lying on his bed wearing his dress uniform. He was buried at sea. Berenguela′s commanding officer temporarily took command of the squadron.
Méndez Núñez was aboard Numancia at Callao when Pareja died. Observing the departure of the Peruvian Navy screw frigates Amazonas and Apurímac on 3 December 1865, he became concerned that Peru had joined the war against Spain and departed Callao with Marqués de la Victoria in tow on 5 December 1865. Numancia rendezvoused with Villa de Madrid and the screw frigate Berenguela at Caldera, Chile, on 12 December. Learning of Pareja's death, Méndez Núñez took charge of the Pacific Squadron that day and transferred to Villa de Madrid. Antequera took command of Numancia.
After meeting with the commanding officers of the squadron′s ships, Méndez Núñez departed aboard Villa de Madrid bound for Coquimbo, Chile, where he rendezvoused with Reina Blanca. The two ships got underway on 18 December for Valparaíso, where Vencedora and the screw frigate Resolución joined them on 19 December 1865, thus concentrating the squadron there. A few days later, he limited the blockade to Valparaíso and Caldera and advised the Spanish government that he believed other South American countries would soon join the war and that the logistical problems the Pacific Squadron then would face would make it difficult or impossible for Spain to continue the war. He offered the opinion that this made the destruction of the Chilean Navy and punitive actions against Chilean ports necessary to bring the war to a conclusion on Spain's terms. The Spanish government instructed him to take action accordingly. Upon receiving these instructions, Méndez Núñez lifted the blockade of Caldera and deployed the entire Pacific Squadron off Valparaíso, burning several prize ships the squadron had captured, which was a common practice at the time; the Spanish government nonetheless criticized him for destroying the prizes and warned him against doing so again, although it did not offer any instructions as to what he otherwise was to do with prizes at such a great distance from any Spanish base.
After bringing aboard supplies from a newly arrived Spanish frigate, Méndez Núñez′s squadron began operations to find and recapture Virgen de Covadonga. The squadron first searched the Juan Fernández Islands and then Puerto Inglés on Chiloé Island in the Chiloé Archipelago off Chile without finding her. At Puerto Inglés, however, a boarding party from Berenguela inspected a steamer which Berenguela sank after finding that she lacked documentation. Rifle fire from shore harassed the boarding party′s boat, so Berenguela returned fire, bombarding the coastline until the rifle fire stopped.
Peru joined the war against Spain on 14 January 1866, as did Ecuador on 30 January. Méndez Núñez sent Villa de Madrid and the screw frigate Reina Blanca south to attack a Chilean-Peruvian squadron in the Chiloé Archipelago, but the resulting Battle of Abtao was indecisive. Méndez Núñez decided to make a second attempt at destroying the allied squadron, this time with Numancia and Reina Blanca under his personal command. On 17 February 1866, he and the two ships left the waters off Valparaíso and headed south to the Chiloé Archipelago, where they found that the allied ships had retreated into an inlet on the coast of Calbuco Island. Unable to close with the allied ships because of Numancia′s draft, Méndez Núñez ordered his ships to withdraw and began a return voyage to Valparaíso. The two Spanish ships anchored at Puerto Low on 27 February, at Puerto Oscuro on 1 March, and in the Gulf of Arauco on 9 March 1866. At some point during the voyage — sources disagree on whether it was on 6 March or on the afternoon of 9 March — Reina Blanca captured the Chilean sidewheel paddle steamer Paquete de Maule, which was bound from Lota, Chile, to Montevideo carrying naval personnel assigned to join the crews of the Peruvian ironclad turret ship Huáscar and broadside ironclad Independencia there; sources disagree on the number of personnel aboard, claiming both a total of 134 men and of eight officers and 140 enlisted men. On 10 March, Reina Blanca captured two Chilean barges carrying coal and gunpowder, both much needed by the Spanish squadron. Numancia, Reina Blanca, and their three prizes departed the Gulf of Arauco on 12 March to rejoin the rest of the Pacific Squadron off Valparaíso, Numancia and Paquete de Maule doing so on 14 March and Reina Blanca and the two barges arriving on 15 March. Chilean authorities offered to exchange Spanish civilians held in Chile for the men captured aboard Paquete de Maule, but Méndez Núñez turned the offer down. He hoped to exchange his captives for the Spaniards captured aboard Virgen de Covadonga, but the Chileans refused.
Bolivia joined the war against Spain on 22 March 1866, closing all the Pacific ports of South America south of Colombia to Spanish ships. After the Chilean government ordered all vessels communicating with the Spanish fleet to be barred from Chilean ports, Mendez Núñez, under orders to take punitive action against South American ports, presented an ultimatum from the Spanish government to the Chilean government on 24 March 1866: if Chile did not meet Spanish demands, he would bombard the undefended port of Valparaíso, although he found the idea of attacking an undefended port repugnant. When Hugh Judson Kilpatrick, the American minister to Chile, learned that Méndez Núñez had been ordered to bombard Valparaíso, he asked the United States Navy commander in the area, Commodore John Rodgers, to attack the Spanish fleet, Méndez Núñez famously responded with "I will be forced to sink [the U.S. ships], because even if I have one ship left I will proceed with the bombardment. Spain, the Queen and I prefer honor without ships than ships without honor (España prefiere honra sin barcos a barcos sin honra.)"
Not receiving a favorable response from the Chileans, Méndez Núñez and his squadron got underway at 06:00 on 31 March 1866 and at arrived at Valparaíso at 08:00. Foreign warships at Valparaíso had gathered near the harbor's entrance to keep clear of the bombardment, so Numancia fired two shots to signal the rest of the squadron to open fire, then took no further part in the bombardment itself, instead withdrawing to a position offshore where she could intervene if any foreign warships tried to interfere. The squadron opened fire at 09:00. The foreign ships simply looked on passively and, facing no opposition, Reina Blanca, Villa de Madrid, Resolución, and Vencedora conducted a three-hour bombardment of Valparaíso while Berenguela and Paquete de Maule stood by offshore to guard against any attempt at escape by Chilean merchant ships. By the time it ended at 12:00, the bombardment had killed two people, injured 10, and sunk 33 merchant ships in the harbor, destroying Chile's merchant fleet. It inflicted US$10 million (equivalent to about US$224 million in 2011) in damage.
Méndez Núñez chose the heavily defended port of Callao for his next attack. He divided the squadron into two divisions, the first made up of Numancia, Berenguela, Reina Blanca, Vencedora, and three auxiliary steamers and the second of Villa de Madrid, Resolución, the screw frigate Almansa, Paquete de Maule, and three transport frigates and, after burning prize ships his squadron had captured, set off on 14 April 1866 for San Lorenzo Island off Callao, the second division getting underway at 09:00 and the first division at 16:00. The first division made the voyage under steam and arrived at San Lorenzo Island on 25 April, while the second division, making the journey under sail and delayed by the low speed of one of the transport frigates, arrived on 27 April 1866. Several days of negotiations began on 26 April, during which Méndez Núñez granted neutral countries a four-day delay in his attack to give them time to salvage their interests in Callao. The Spanish ships used the delay to prepare for the attack: The frigates all lowered their topmasts and main yards and altered their rigging to reduce the likelihood of damage to their masts, set up on-board field hospitals, and painted over the white stripes on their hulls with black paint to reduce the ships' visibility and give Peruvian gunners less of an aiming point. A messenger arrived on 1 May with orders for Méndez Núñez to return to Spain, but Méndez Núñez viewed it as dishonorable to withdraw from the southeastern Pacific after bombarding an undefended port and without engaging the defenses of heavily fortified Callao, and he asked the messenger to report that the message had not arrived until 3 May so that the attack on Callao could go ahead on 2 May.
On the morning of 2 May 1866 the Spanish ships entered Callao Bay, beginning the Battle of Callao, the largest battle of the Chincha Islands War. Vencedora and the auxiliary ships stood off near San Lorenzo Island while the other six Spanish ships attacked Callao, with Numancia (operating as Méndez Núñez′s flagship), Almansa, and Resolución assigned to bombard the northern part of the harbor while Reina Blanca, Berenguela, and Villa de Madrid shelled the southern part. Numancia fired the first shot at 11:55, and soon all the Spanish ships were exchanging fire with the Peruvian fortifications. At one point, Numancia struck bottom in 30 feet (9.1 m) of water and had some difficulty pulling off the shoal, overheating her propeller bearings while running her engine in reverse at full power. Seeing that Numancia was immobilized temporarily, Peruvian gunners focused on her, and one shell struck her bridge, from which Méndez Núñez was commanding the squadron. The shell carried away the binnacle, and nine shell fragments struck Méndez Núñez. He tried to continue, but collapsed after a few minutes, and was forced to turn over command of the squadron to Miguel Lobo Malagamba.
Numancia fired over a thousand rounds during the Battle of Callao and took either 45 or 52 hits, according to different sources, including four by 500-pound (227 kg) shells and two by 300-pound (136 kg) shells. but only one shell penetrated Numancia′s armor; the teak wood underneath it absorbed much of the remaining force of the impact, which resulted merely in a few blown-out rivets and a small leak that her crew repaired quickly. She otherwise suffered only a few dents and scratches. During the bombardment, Numancia accidentally cut an underwater cable used to activate Peruvian mines, rendering the mines useless. By 16:00, only three Peruvian guns still were firing, and Méndez Núñez, whose wounds were not serious, ordered Numancia, Almansa, Resolución, and Vencedora to shift fire from the harbor defenses to the city itself, but he rescinded the order after his officers advised him that his squadron had run low on explosive shells and would have to use solid shot, which would be ineffective. Running low on ammunition and with only the last three Peruvian guns still firing, the Spanish squadron ceased fire at 16:40 as dusk fell and fog began to form in the harbor.
Méndez Núñez's squadron spent the next several days at San Lorenzo Island, making repairs and tending to casualties. The Chincha Islands War ended in a ceasefire on 9 May 1866, and on 10 May 1866, Mendez Núñez's squadron burned and scuttled Paquete de Maule near San Lorenzo Island and departed South American waters. Viewing his ships as too badly damaged to make an eastward passage around Cape Horn in winter, Méndez Núñez decided to steam west and led most of the squadron on a voyage across the Pacific, Indian, and Atlantic Oceans to Rio de Janeiro, Brazil, with Villa de Madrid as his flagship. However, Berenguela′s and Numancia′s temporary repairs at San Lorenzo Island were deemed inadequate for them to make the entire voyage safely, and Numancia also had exhausted her coal supply, so Méndez Núñez formed a separate division made up of Numancia, Berenguela, Vencedora, Marqués de la Victoria, the steamer Uncle Sam, and the sailing transport Matauara to proceed under sail to the Philippines, where Berenguela and Numancia could undergo permanent repairs After parting company wih the Philippines-bound ships, the rest of Méndez Núñez's squadron passed around the Cape of Good Hope under sail in winter without warm clothing or fresh food, and scurvy broke out among the crews. By the time the squadron had crossed the South Atlantic Ocean and made port at Rio de Janeiro on 24 June 1866, completing a circumnavigation of the world, 31 members of Villa de Madrid′s crew had died and 350 more were sick, and the crews of the other ships had suffered similarly.
After arriving at Rio de Janeiro, the squadron began patrols in the South Atlantic while Méndez Núñez took measures to address the needs of his own squadron and indiscipline at the Spanish Navy′s Río de la Plata station at Montevideo. The arrival of the screw frigates Concepción and Navas de Tolosa finally allowed Méndez Núñez to release those of his ships in the poorest condition — Villa de Madrid, Reina Blanca, and Resolución — to return to Spain. Despite the ceasefire in the southeastern Pacific, Spain had not yet reached peace settlements with its opponents, and so Méndez Núñez, although still recovering from his wounds, remained in command on the South American station with Almansa, Concepción, and Navas de Tolosa, patrolling in the Atlantic Ocean and the Caribbean against possible enemy naval operations and interdicting contraband bound for the southeastern Pacific. During these operations, Méndez Núñez was at sea continuously for several months, during which his squadron captured several ships and anchored on a number of occasions at Montevideo and at Buenos Aires in Argentina.
Méndez Núñez's squadron arrived at the Rio de la Plata station on 12 December 1866 for one of its visits to that area. After the Ministry of the Navy received word that a combined Chilean Navy-Peruvian Navy squadron planned to cross into the Atlantic Ocean, Méndez Núñez received orders to return to Rio de Janeiro. On 24 December 1866, the Ministry of the Navy ordered Méndez Núñez to move to Havana and prepare to defend the Antilles against attack. These orders reached Méndez Núñez on 1 February 1867. On 20 March 1867 Concepción, Almansa, and Navas de Tolosa arrived at Santiago de Cuba on the southeastern coast of Cuba under Méndez Núñez's overall command. The ships then proceeded to Havana, which they reached on 26 March 1867. Navas de Tolosa captured the Peruvian Navy steamer Rayo off Cartagena, Colombia, on 25 April 1867. The squadron also visited Saint Thomas in the Danish West Indies during its Caribbean deployment. After Méndez Núñez received new orders to proceed to Rio de Janeiro, he transferred his flag to Almansa and his squadron got underway, arriving at Rio de Janeiro in August 1867. The squadron again moved to the Rio de la Plata in November 1867.

#### Later career

When Méndez Núñez learned in July 1868 that Spain had reached a peace agreement with Chile and Peru, he requested that the Spanish government relieve him of command of the squadron and recommended that the squadron itself be dissolved and return to Spain because it had become an unnecessary expense. However, government officials were making plans to depose Queen Isabella II and, knowing that his sympathies lay with her and that his great fame after the Chincha Islands War would give him influence on affairs in Spain that would work against their goals, surprised him by denying his request on the grounds that it lacked merit unless he needed to return to Spain because of ill health, and he had made no claim of ill health. He protested that Royal Orders gave him the right to request relief without resorting to a false claim of ill health, which he viewed as dishonorable. Without standing for election, he was elected to office in the Congress of Deputies for the constituency of A Coruña and Pontevedra, but he had no interest in politics and refused to take office. The Congress of Deputies responded by insisting that he must occupy the office of deputy, although government officials wished him to remain in command on the South American station, and so his seat in the Congress of Deputies remained vacant.
In September 1868, Isabella II was deposed in the Glorious Revolution, in which for the first time in Spanish history the Spanish Navy took part in an uprising against the monarchy. By a decree of 20 October 1868, the new Provisional Government′s Minister of the Navy, Juan Bautista Topete, ordered Méndez Núñez back to Spain, informing him that the new government needed the services of someone with his standing and experience. Having made clear his disapproval of the Spanish Navy's involvement in the deposition of Isabella II, which he viewed as an example of the most extreme form of insubordination possible, he agreed to return in the hope of rehabilitating and protecting the navy's reputation. He turned over command of the squadron to Miguel Lobo Malagamba on 5 November 1868 and departed Rio de Janeiro on 6 November aboard Navas de Tolosa, arriving at Cádiz on 15 December 1868. He reached Madrid on 18 December and immediately participated in a ceremony in which he took office as the new government's vice president of the Board of the Navy. When he arrived at his office on 19 December, he received word that he had been promoted to the rank of vicealmirante (vice admiral), but he refused the promotion on the grounds that he was too junior and had not yet earned it.
On 9 March 1869, a decree of the Provisional Government made Méndez Núñez vice-president of the Admiralty, which was the body that replaced the Provisional Government Board of the Navy. During unrest in Spain in 1869, Méndez Núñez ignored the entreaties of friends urging him to join the revolution, which he believed would soon fail and lead to a restoration of the monarchy. Further alienated from politics and military men who engaged in them, he focused on reforming the Spanish Navy, instituting "half salaries" for personnel to increase funding for the construction of new ships. His attitude and actions in turn alienated many officials both within and outside the navy. On 30 March 1869 he received an anonymous written proposal that he be proclaimed Spain's head of state, but refused even to consider the idea.

### Death and burial

In late July 1869 Méndez Núñez became ill while climbing the stairs in the Ministry of the Navy building in Madrid. Taking leave to recover, he left Madrid on 28 July and travelled by train to Lisbon, Portugal, where he boarded the Spanish paddle gunboat Colon on 30 July. He disembarked at Marín, Spain, and traveled overland 7 kilometres (4.3 mi) to Pontevedra, where he planned to recuperate at his home, arriving there on 2 August 1869. In early August his condition improved, but it took a sharp downturn a few days later. He died at the age of 45 on 21 August 1869. In his will, he bequeathed all gifts he had received during his naval service to the Naval Museum of the Ministry of the Navy.
Méndez Núñez was buried at Pontevedra. After a customary wait of five years, his remains were interred in the family pantheon at the Chapel of El Real in Moaña in 1874. King Alfonso XII visited the chapel on 2 August 1877 and decreed that his remains should be reburied at the Panteón de Marinos Ilustres (Pantheon of Illustrious Sailors) in Cádiz. Accordingly, they were disinterred and brought to Vigo by boat on either 4 or 9 June 1883, according to different sources. A British Royal Navy squadron under the command of Vice-Admiral William Dowell and Rear-Admiral John Wilson consisting of the armoured frigates HMS Achilles, HMS Agincourt, HMS Minotaur, and HMS Northumberland, the centre battery ironclad HMS Sultan, and the ironclad turret ship HMS Neptune attended the event. Dozens of ships and boats and hundreds of people followed a military parade that took place in the estuary as the boat carrying Méndez Núñez's ashes headed for a wooden quay where 300 British sailors, Spanish troops, the clergy of Vigo, the town council, and various other dignitaries met it. They began a procession through the streets of the city joined by hundreds of other people, with windows along the parade route draped in black. The ashes then were placed aboard the screw frigate Lealtad at Vigo.
Lealtad disembarked Méndez Núñez′s remains at San Fernando at 08:30 on 16 June 1883, and Méndez Núñez was reburied at the Panteón de Marinos Ilustres in the second chapel from the entrance on its eastern side. A monument tomb in the chapel bears the inscription "R.I.P.A. His Excellency Counter Admiral Don Casto Méndez. Died on the 21st of August of 1869. Model of great virtues, he dedicated his life to the service of the Fatherland whose glories he exalted in the command of the Pacific Squadron." A wreath attached beneath it bears the inscription "The Spanish residents in the Argentine Republic to the distinguished Admiral D. Casto Méndez Núñez, 1885."

## Honors and awards
### Kingdom of Spain

* Commander of the Order of Charles III
* Knight Grand Cross of the Order of Charles III
* Knight of the Order of Saint Hermenegild
* Cross of Distinction of Fernando Po

### Foreign

* Knight Commander of the Order of St. Gregory the Great (Holy See)
* Knight of the Order of Pope Pius IX (Holy See)

## Commemoration

After Méndez Núñez′s death, every city and town in Galicia named a street, square, promenade, or café for him.
In 1872, Méndez Núñez′s family was granted the hereditary title Marquis of Méndez Núñez.
The house in which Méndez Núñez died faces onto a medieval square in the heart of Pontevedra which was renamed Plaza de Méndez Núñez in his honor on 31 August 1875.
Santiago de Compostela and other Galician cities erected statues of Méndez Núñez. A statue of him sculpted by Agustí Querol Subirats was dedicated in Vigo on 22 August 1890, and the Spanish submarine pioneer Isaac Peral attended the dedication ceremony.
A room at the Pazo de García Flórez in Pontevedra dedicated to a display of Méndez Núñez's office opened to the public in 1969.
Four Spanish Navy warships have been named Méndez Núñez:
* An armoured frigate, converted from the screw frigate Resolución, renamed Méndez Núñez in 1870, and retired in 1888.
* Méndez Núñez, a Blas de Lezo-class light cruiser built in 1924 and retired in 1963.
* The former USS O'Hare (DD-889), a Gearing-class destroyer, in service in the Spanish Navy as Méndez Núñez from 1973 to 1992.
* Méndez Núñez, an Álvaro de Bazán-class frigate commissioned in 2006.
The municipality of Mendez in the Province of Cavite in the Philippines was named in honor of Méndez Núñez.