Meantime two important events had occurred. Guayaquil had pronounced in favour of the Revolution, and Cochrane had cut out the frigate Esmeralda from under the guns of Callac.

The province of Guayaquil, once a dependency of Peru, now formed part of the Viceroyalty of New Granada, being attached to the district governed by the Captain-General of Quito, but from the exigencies of the moment was for a time again under the rule of the Viceroy of Peru. The port of Guayaquil was the arsenal of Spain on the Pacific, and, Callao being blockaded, was now the last refuge of the navy dispersed by Cochrane, and was garrisoned by a strong battalion of Spanish infantry.

Quito had remained quiet since the outbreak of 1809, but the advance of Bolívar on the north, the invasion of Peru by San Martin, and the victories of Cochrane on the Pacific, aroused a dangerous excitement among the people. On the 9th October a part of the garrison of Guayaquil rose in arms, and was supported by the people. The Province joined the movement, declared itself independent, appointed a Junta, and placed itself under the protection of San Martin and Bolívar. Melchor Aymerich, an experienced officer, was at this time Captain-General of Quito, and had 5,000 men under his command, exclusive of the garrison of Guayaquil.

The active spirit of Cochrane found nothing more to do upon the ocean. The Spanish fleet was reduced to three frigates, the Prueba, the Venganza, and the Esmeralda. The two first, after bringing from the southern ports a division of the army of Upper Peru, had taken refuge at Guayaquil. Cochrane boldly determined to capture the other frigate by cutting her and some smaller vessels out from under the fire of the 250 guns mounted on the batteries of Callao, a feat which would increase his renown, and might induce San Martin to adopt more active operations against Lima, for the Admiral had no sympathy for his dilatory proceedings. He informed San Martin of his intention, and the Generalissimo accepted the idea with enthusiasm.

Anchored near to the Esmeralda were the corvette Sebastiana, two brigs, two schooners, and three armed merchant vessels, within a semicircular line of twenty gunboats, all shut in by a boom, through which there was only one narrow entrance. Cochrane asked for volunteers. The whole of his crews offered themselves. From them he selected 160 seamen and 80 marines. Three days he employed in preparing fourteen boats, and in instructing the men. On the night of the 4th November the flotilla assembled alongside the flag-ship, under lee of the island of San Lorenzo, where they could not be seen from shore. On the 5th the three other vessels of the blockading squadron were sent for a cruise outside. The Spaniards, thinking the blockade was raised, celebrated the occasion by a banquet on the Esmeralda. After sundown, amid complete silence, an address from the Admiral was passed round the boats:—

“The moment of glory is approaching. I hope that the Chilians will fight as they have been accustomed to do, and that the English will act as they have ever done at home and abroad.”

Men and officers were all dressed in white, Cochrane himself wearing a blue band round his arm. At half-past ten the fourteen boats pulled with muffled oars silently away in two parallel lines, one led by Captain Crosbie, the other by Captain Guise. Cochrane went himself in another boat ahead of the rest. The British frigate Hyperion, and the United States frigate Macedonia, lay at anchor outside the boom. As the boats passed by the latter ship, her officers, in low voices, wished the crews good luck; but an officer of the Hyperion, who shouted “Hurrah!” as he saw them, was put under arrest, for Cochrane was not popular with the commanders of British ships, whatever sympathies he might have among the men. The last boat of the flotilla remained alongside the Macedonia, and Cochrane, knowing nothing of the desertion, went on, followed by only thirteen boats.

It was very dark when at midnight they reached the passage through the boom. It was guarded by a gunboat. Cochrane, pistol in hand, sprang on board, threatening instant death to any man who spoke. The crew surrendered, and the boats rowed on unperceived straight for the Esmeralda, where Captain Coig and his officers, after their banquet, were playing cards in the cabin. Cochrane, leaping into the chains, was the first on board, but was knocked back into the boat by the sentry on the poop. In a moment he was up again, followed by his crew. The sentry fired, but was immediately cut down.

“Up, my lads! she’s ours!” shouted Cochrane to the other boats, and then hailed the tops, which were already occupied by men previously told off for the purpose. The sails of the ship were at his orders, but the deck was yet held by the Spanish marines, who had seized their arms on hearing the shot fired by the sentry.

Cochrane, with the boats led by Crosbie, had boarded on the starboard quarter; now Guise and his division boarded on the port side. The two parties met on the quarter-deck, Guise and Cochrane shaking hands in the enthusiasm of the moment. From the forecastle the marines opened fire upon them. Cochrane was shot through the thigh. Seating himself on a gun, he bound up the wound with his handkerchief, and ordered a charge on the enemy. Twice the assailants were beaten back, and Guise was wounded; but again he led on the boarders, and the crew of the Esmeralda were either forced overboard or driven below the hatches.