Elsewhere in southern Spanish America a brilliant feat of arms brought to the fore its most distinguished soldier. This was Jose de San Martin of La Plata. Like Miranda, he had been an officer in the Spanish army and had returned to his native land an ardent apostle of independence. Quick to realize the fact that, so long as Chile remained under royalist control, the possibility of an attack from that quarter was a constant menace to the safety of the newly constituted republic, he conceived the bold plan of organizing near the western frontier an army—composed partly of Chilean refugees and partly of his own countrymen—with which he proposed to cross the Andes and meet the enemy on his own ground. Among these fugitives was the able and valiant Bernardo O'Higgins, son of an Irish officer who had been viceroy of Peru. Cooperating with O'Higgins, San Martin fixed his headquarters at Mendoza and began to gather and train the four thousand men whom he judged needful for the enterprise.

By January, 1817, the "Army of the Andes" was ready. To cross the mountains meant to transport men, horses, artillery, and stores to an altitude of thirteen thousand feet, where the Uspallata Pass afforded an outlet to Chilean soil. This pass was nearly a mile higher than the Great St. Bernard in the Alps, the crossing of which gave Napoleon Bonaparte such renown. On the 12th of February the hosts of San Martin hurled themselves upon the royalists entrenched on the slopes of Chacabuco and routed them utterly. The battle proved decisive not of the fortunes of Chile alone but of those of all Spanish South America. As a viceroy of Peru later confessed, "it marked the moment when the cause of Spain in the Indies began to recede."

Named supreme director by the people of Santiago, O'Higgins fought vigorously though ineffectually to drive out the royalists who, reinforced from Peru, held the region south of the capital. That he failed did not deter him from having a vote taken under military auspices, on the strength of which, on February 12, 1818, he declared Chile an independent nation, the date of the proclamation being changed to the 1st of January, so as to make the inauguration of the new era coincident with the entry of the new year. San Martin, meanwhile, had been collecting reinforcements with which to strike the final blow. On the 5th of April, the Battle of Maipo gave him the victory he desired. Except for a few isolated points to the southward, the power of Spain had fallen.

Until the fall of Napoleon in 1815 it had been the native loyalists who had supported the cause of the mother country in the Spanish dominions. Henceforth, free from the menace of the European dictator, Spain could look to her affairs in America, and during the next three years dispatched twenty-five thousand men to bring the colonies to obedience. These soldiers began their task in the northern part of South America, and there they ended it—in failure. To this failure the defection of native royalists contributed, for they were alienated not so much by the presence of the Spanish troops as by the often merciless severity that marked their conduct. The atrocities may have been provoked by the behavior of their opponents; but, be this as it may, the patriots gained recruits after each victory.

A Spanish army of more than ten thousand, under the command of Pablo Morillo, arrived in Venezuela in April, 1815. He found the province relatively tranquil and even disposed to welcome the full restoration of royal government. Leaving a garrison sufficient for the purpose of military occupation, Morillo sailed for Cartagena, the key to New Granada. Besieged by land and sea, the inhabitants of the town maintained for upwards of three months a resistance which, in its heroism, privation, and sacrifice, recalled the memorable defense of Saragossa in the mother country against the French seven years before. With Cartagena taken, regulars and loyalists united to stamp out the rebellion elsewhere. At Bogoth, in particular, the new Spanish viceroy installed by Morillo waged a savage war on all suspected of aiding the patriot cause. He did not spare even women, and one of his victims was a young heroine, Policarpa Salavarrieta by name. Though for her execution three thousand soldiers were detailed, the girl was unterrified by her doom and was earnestly beseeching the loyalists among them to turn their arms against the enemies of their country when a volley stretched her lifeless on the ground.

Meanwhile Bolivar had been fitting out, in Haiti and in the Dutch island of Curacao, an expedition to take up anew the work of freeing Venezuela. Hardly had the Liberator landed in May, 1816, when dissensions with his fellow officers frustrated any prospect of success. Indeed they obliged him to seek refuge once more in Haiti. Eventually, however, most of the patriot leaders became convinced that, if they were to entertain a hope of success, they must entrust their fortunes to Bolivar as supreme commander. Their chances of success were increased furthermore by the support of the llaneros who had been won over to the cause of independence. Under their redoubtable chieftain, Jose Antonio Paez, these fierce and ruthless horsemen performed many a feat of valor in the campaigns which followed.

Once again on Venezuelan soil, Bolivar determined to transfer his operations to the eastern part of the country, which seemed to offer better strategic advantages than the region about Caracas. But even here the jealousy of his officers, the insubordination of the free lances, the stubborn resistance of the loyalists—upheld by the wealthy and conservative classes and the able generalship of Morillo, who had returned from New Granada—made the situation of the Liberator all through 1817 and 1818 extremely precarious. Happily for his fading fortunes, his hands were strengthened from abroad. The United States had recognized the belligerency of several of the revolutionary governments in South America and had sent diplomatic agents to them. Great Britain had blocked every attempt of Ferdinand VII to obtain help from the Holy Alliance in reconquering his dominions. And Ferdinand had contributed to his own undoing by failing to heed the urgent requests of Morillo for reinforcements to fill his dwindling ranks. More decisive still were the services of some five thousand British, Irish, French, and German volunteers, who were often the mainstay of Bolivar and his lieutenants during the later phases of the struggle, both in Venezuela and elsewhere.

For some time the Liberator had been evolving a plan of attack upon the royalists in New Granada, similar to the offensive campaign which San Martin had conducted in Chile. More than that, he had conceived the idea, once independence had been attained, of uniting the western part of the viceroyalty with Venezuela into a single republic. The latter plan he laid down before a Congress which assembled at Angostura in February, 1819, and which promptly chose him President of the republic and vested him with the powers of dictator. In June, at the head of 2100 men, he started on his perilous journey over the Andes.

Up through the passes and across bleak plateaus the little army struggled till it reached the banks of the rivulet of Boyaca, in the very heart of New Granada. Here, on the 7th of August, Bolivar inflicted on the royalist forces a tremendous defeat that gave the deathblow to the domination of Spain in northern South America. On his triumphal return to Angostura, the Congress signalized the victory by declaring the whole of the viceroyalty an independent state under the name of the "Republic of Colombia" and chose the Liberator as its provisional President. Two years later, a fundamental law it had adopted was ratified with certain changes by another Congress assembled at Rosario de Cucuta, and Bolivar was made permanent President.

Southward of Colombia lay the viceroyalty of Peru, the oldest, richest, and most conservative of the larger Spanish dominions on the continent. Intact, except for the loss of Chile, it had found territorial compensation by stretching its power over the provinces of Quito and Charcas, the one wrenched off from the former New Granada, the other torn away from what had been La Plata. Predominantly royalist in sentiment, it was like a huge wedge thrust in between the two independent areas. By thus cutting off the patriots of the north from their comrades in the south, it threatened both with destruction of their liberty.