By the middle of January, 1817, he was ready to start. To divert attention and confuse the Spaniards, four expeditions simultaneously crossed the mountains. One left San Juan and took the road for Coquimbo; another left La Rioja with Copiapó as destination; a third went through the southern pass which lead to Talca; while the main force, in two divisions, took the nearer routes. Las Heras, with the artillery, went over the Uspallata trail, through the divide where the Christ now stands; while San Martín with the bulk of the army, travelled the Los Patos road, some forty miles to the north. The two columns were to meet at Chacabuco on the Chilean side. The entire undertaking was perfectly planned and admirably executed.
The three minor expeditions were small in number, from 100 to 200 men each, and all victoriously attained their objectives. The main body was composed of 4000 fighting men, of which 3000 were infantry; there were 1200 camp helpers, 120 miners to break road, and drivers and mechanics. It started with 1500 horses, 13,000 mules and 600 steers. The trip across the Andes took 23 days. On February 12, 1817, the two columns reunited at Chacabuco and found awaiting them a Spanish army of about one half their own strength. San Martín's tactics of diverting the enemy's attention by attacks at various points had succeeded.
The battle was short and the Argentines were completely victorious. Two days later, or on February 14, 1817, San Martín entered Santiago, and sent a memorable despatch to Buenos Aires.—"The Army of the Andes has the glory to report:—In 24 days campaigning, we crossed the highest mountain chain on the globe, finished with the tyrants and have given liberty to Chile."
Chacabuco was the battle of most momentous consequences in South American history. When news of defeats on every hand had killed patriotic hopes and nothing remained to the Argentine but the same humiliating domination which had been imposed on all other Spanish American countries, news of a victory as complete as it was unexpected was heralded from one end of the continent to the other, and faith in the cause of independence was renewed.
San Martín did not follow up his victory as thoroughly as he should have. His mind had turned with characteristic absorption to the next step of his great plan, the preparation for an expedition against Lima where existed the headquarters of Viceregal strength and authority in America. The Spanish forces after Chacabuco reunited and reorganized in southern Chile, and important reinforcements from Perú landed at Talcahuano, a port which had successfully resisted Argentine attacks. A strong army capably officered and fully equipped, started northward from Talcahuano to recapture Santiago and reconquer Chile. Comparatively little opposition was encountered until the Spaniards were close to Santiago, when San Martín took the field and resisted further advance. More than that, he slowly but surely pushed the Spaniards southward, and seemed about to force them back into Talcahuano. A surprise attack by night by the enemy at Cancha Rayada was unexpectedly successful and the combined armies of Argentine and Chile were defeated and dispersed, losing all their artillery and most of their military stores. The disaster happened on March 20, 1818. The patriot armies reformed as they retreated before the victorious Spaniards; and sixteen days after Cancha Rayada, San Martín turned at Maipú, faced the confident and more numerous Spaniards, and administered a defeat which freed Chile forever from the domination of Spain. San Martín always considered this his best campaign. By pure force of character and of genius, he rehabilitated in a few days a crushed and retreating army, and turned defeat into victory. The Spaniards took refuge in Talcahuano, and from there sailed back to Perú. Chile was free.
The Anglo-Spanish alliance of 1808 to crush Napoleón gave Spain freedom at sea, and she took full advantage of the privilege. Between 1811 and 1818, she transported 42,000 veteran troops to different points in America, and moreover kept trade routes open on the Pacific coast of South America and elsewhere. San Martín could not risk an expedition to Perú until he controlled the Pacific Ocean from Chile to Panamá. Reference has been made to the destruction of the Spanish fleet of Montevideo in 1814, by Admiral Brown, an Irishman who had spent his youth in the United States. In response to insistent suggestions from San Martín, an expedition under Brown sailed from Buenos Aires in October, 1815, went through the Straits and on January 21, 1816, attacked Callao. Failing to capture that port Brown blockaded it for three weeks, went on to Guayaquil and Ecuador, and returned to Buenos Aires after numerous and picturesque adventures. This is the first time the Argentine flag had appeared on the Pacific. In 1818 the celebrated Lord Cochrane offered his services and was given command of the Pacific squadron. By purchase and by capture, the naval forces were augmented and in 1820, San Martín saw the realization of his desire to control the sea from Panamá southward.
This paper would be too long if it attempted to cover all the difficulties with which San Martín had to contend. He had trouble with the jealous and avaricious Cochrane; a mutiny occurred among a body of his troops in San Juan, there was anarchy in Tucumán, Córdoba, San Luis and even in his beloved Mendoza. The Government of Buenos Aires ordered him to return to put down the growing civil strife, but he refused, urging the fundamental necessity of destroying Spanish domination in America. Historians call this "The Great Disobedience." He allowed none of these things to distract his attention, and on August 20, 1820, sailed from Valparaíso in 8 ships and 16 transports, carrying 4430 soldiers of which 2313 were Argentines, 1805 Chilians, and the rest of scattering nationalities. There were also 1600 sailors and mariners, of which 600 were foreigners, mostly British. The expedition stopped at intermediate ports, from which incursions were made. Again the Spaniards did not know where to expect the attack, and when the fleet appeared before Lima early in July, 1821, but little defense was made. The trip from Valparaíso to Lima consumed 10½ months. The Spanish forces retreated to Upper Perú, where they strongly entrenched themselves in the mountains and settled down to await reinforcements from Spain. San Martín took the title of "Protector of Perú" and assumed full civil and military authority.
Brief mention must be made of the Venezuelan movement, whose dominant figure was Bolívar. Venezuela revolted in 1810, was reconquered in 1813, uprose again and was again reconquered in 1814. A third uprising took place in 1815, and a war of fluctuating fortunes followed until 1818, when the Spaniards were driven from the country. In that year (1818) O'Higgins whom San Martín had installed as President of Chile, wrote Bolívar suggesting united action against the enemy. Bolívar replied that he would operate against Quito while the Argentine-Chilean forces operated against Perú. In effect Bolívar crossed the Andes in 1819, winning an important victory at Boyacá, similar in many respects to the Argentine achievement at Chacabuco two years before.
During his absence across the mountains, the Spaniards reorganized, and Bolívar returned to Venezuela and in 1821 at Carabobo won another great victory. As Maipú had freed Chile and the South three years previously, so did Carabobo free Venezuela and all the North. It occurred eighteen days after San Martín entered Lima. At San Martín's suggestion a conference between Bolívar and himself was agreed upon, and took place in Guayaquil on July 26, 1822. The interview was continued on the following day and then San Martín departed for Perú. Nothing is known of what transpired at this historic conference. No one was present except the two principals, and neither at that or at any subsequent time did either ever reveal what happened.
San Martín returned to Lima, convoked a Peruvian Congress, and on September 20th. 1822, delivered to it all of his civil and military authority. He placed his army at the disposition of the new government to assist in the final steps in the destruction of Spanish power, and sailed for Valparaíso on that same night. The only recorded expression of the reason for his sudden abdication was made to his friend and secretary, Guido, a few moments before his departure. "Perú is not large enough to hold Bolívar and me." He felt his work was done, that South American emancipation was absolutely assured, and he retired.