The road to Madrid being opened by this victory the army of Andalucia entered the capital in triumph, and San Martin received, with his commission as lieutenant-colonel, a gold medal for his conduct in the battle.

He was afterwards present at the disaster of Tudela, and in the retreat to Cadiz, and in 1810 was appointed aide-de-camp to the Marquis of Coupigni. In 1811 he took part in the bloody battle of Albuera, where the French were defeated by an allied army under General Beresford, the same who five years previously had capitulated to Liniers at Buenos Ayres. The same year he joined the Sagunto regiment, the escutcheon of which was a sun with this motto “Hœ nubila tolunt obstantia solvens”—dissipates clouds and removes obstacles. This was the last Spanish standard under which San Martin fought, and its symbol was identical with that of the flag of the as yet unthought of army of the Andes.

The prophecy of the dying Pitt was realised. Napoleon had stirred up against himself a national war and was irremediably lost. Spain allied with Great Britain, in saving herself, saved Europe from his brutal domination, and the American Creole having paid with usury his debt to the mother country could now honourably leave her. San Martin had fought under her flag for twenty years, he had seen the strategy of great generals, had learned the tactics of every arm in the service; the pupil was now a master able to give lessons. He turned his eyes to his own country, and seeing her in difficulty resolved to return and consecrate his life to her service.

The confidant of his projects and sentiments on this occasion was a singular personage. Lord Macduff, afterwards Earl of Fife, was a Scotch noble descended from that Shakespearean hero who slew Macbeth. He was in Vienna when the Spanish insurrection broke out in 1808, he came over at once and enlisted as a simple volunteer. As such he took part in most of the great battles of the time, in one of which he was seriously wounded, and was given the rank of a General of Spain for his services. Then it was that San Martin and Macduff became acquainted; their generous natures had a profound sympathy each for the other, their friendship was enhanced by the dangers they shared, and continued so long as both lived. By his help and by the interposition of Sir Charles Stuart, a diplomatic agent in Spain, San Martin obtained a passport for London, and received from his friend letters of introduction, and letters of credit of which he made no use.

In London he met his comrades Alvear and Zapiola, and other South Americans who were there at the time. All belonged to the secret society founded in London by Miranda, in which Bolívar had just taken the oath, before leaving for Venezuela in company with the illustrious master. San Martin and his two comrades were initiated in the fifth and last grade, and in January, 1812, embarked on the George Canning for the River Plate. On the 9th March they reached Buenos Ayres, accompanied by various officers who came to offer their swords in the cause of independence.

The moment was a critical one in the history of the American revolution; the serious work was just commencing; the real struggle between Patriots and Royalists was yet to come, and the discordance of the various elements of society only now became apparent.

The Argentine revolution had provoked insurrection in Chile, both by diplomacy and by example. Her first army of volunteers had marched to Upper Peru with the object of striking the enemy in the centre of his power; and in November, 1810, had won the first victory of the war at Suipacha, but was eight months later defeated at Huaqui, and compelled to retreat to Tucuman. Buenos Ayres had attempted to gain command of the rivers by arming a small squadron, which was destroyed by the enemy in the Paraná. A Portuguese army of four thousand men held the line of the Uruguay. Paraguay had commenced a system of isolation, almost of hostility.

The movement in Chile, at first successful, was in 1812 threatened by an expedition from Peru, and the young Republic unfortunately put her trust in José Miguel Carrera, who, with some attractive qualities, possessed no solid talents, either military or political.

In this same month of March an earthquake destroyed the city of Caracas. Reaction triumphed over Miranda in Venezuela; only in New Granada did the revolutionary cause maintain a footing for some time longer. In 1815 all the insurrections in South America had been suppressed, save only the Argentine revolution, which was never overpowered.

Meantime the viceroyalty of Peru, holding a central position, with a strong army and the command of the sea, was the centre of reaction; and the masses of the people not yet implicated in the revolution, began to look unfavourably upon it, as their eyes were opened to the perils it invoked and to the sacrifices it involved.