José de San Martín José Francisco de San Martín ( 25 February 1778 – 17 August 1850 ) , known simply as José de San Martín ( ) , was an Argentine general and the prime leader of the southern part of South America ' s successful struggle for independence from the Spanish Empire . Born in Yapeyú , Corrientes , in modern Argentina , he left his mother country at the early age of seven to study in Málaga , Spain . In 1808 , after taking part in the Peninsular War against France , San Martín contacted South American supporters of independence from Spain . In 1812 , he set sail for Buenos Aires and offered his services to the United Provinces of the Río de la Plata , present - day Argentina . After the Battle of San Lorenzo and time commanding the Army of the North during 1814 , he organized a plan to defeat the Spanish forces that menaced the United Provinces from the north , using an alternative path to the Viceroyalty of Peru . This objective first involved the establishment of a new army , the Army of the Andes , in Cuyo Province , Argentina . From there , he led the Crossing of the Andes to Chile , and triumphed at the Battle of Chacabuco and the Battle of Maipú ( 1818 ) , thus liberating Chile from royalist rule . Then he sailed to attack the Spanish stronghold of Lima , Peru . On 12 July 1821 , after seizing partial control of Lima , San Martín was appointed Protector of Peru , and Peruvian independence was officially declared on 28 July . On 22 July 1822 , after a closed - door meeting with fellow " Simón Bolívar at Guayaquil , Ecuador , Bolívar took over the task of fully liberating Peru . San Martín unexpectedly left the country and resigned the command of his army , excluding himself from politics and the military , and moved to France in 1824 . The details of the 22 July meeting would be a subject of debate by later historians . San Martín is regarded as a national hero of Argentina and Peru , and , together with Bolívar , one of the liberators of Spanish South America . The Order of the Liberator General San Martín ( " ) , created in his honor , is the highest decoration conferred by the Argentine government . Early life . José de San Martín was the fifth and last son of Juan de San Martín , an unsuccessful Spanish soldier , and Gregoria Matorras del Ser . He was born in Yapeyú , Corrientes , an Indian reduction of Guaraní people . The exact year of his birth is disputed , as there are no records of his baptism . Later documents formulated during his life , such as passports , military career records and wedding documentation , gave him varying ages . Most of these documents point to his year of birth as either 1777 or 1778 . The family moved to Buenos Aires in 1781 , when San Martín was three or four years old . Juan requested to be transferred to Spain , leaving the Americas in 1783 . The family settled in Madrid , but as Juan was unable to earn a promotion , they moved to Málaga . in the city , San Martín enrolled in Málaga ' s school of temporalities , beginning his studies in 1785 . It is unlikely that he finished the six - year long elementary education , before he enrolled in the Regiment of Murcia in 1789 , when he reached the required age of 11 . He began his military career as a cadet in the Murcian Infantry Unit . Military career in Europe . San Martín took part in several Spanish campaigns in Africa , fighting in Melilla and in Oran against the Moors in 1791 , among others . His rank was raised to Sub - Lieutenant in 1793 . He began a naval career during the War of the Second Coalition , when Spain was allied with France against Great Britain , during the time of the French Revolution . His ship " Santa Dorotea " was captured by British forces , who kept him prisoner for some time . Soon afterward , he continued to fight in southern Spain , mainly in Cadiz and Gibraltar with the rank of Second Captain of light infantry . He continued to fight Portugal on the side of Spain in the War of the Oranges in 1801 . He was promoted to captain in 1804 . During his stay in Cádiz he was influenced by the ideas of the Spanish Enlightenment . At the outbreak of the Peninsular War in 1808 , San Martín was named adjutant of Francisco María Solano Ortiz de Rosas . Rosas , suspected of being an " afrancesado " , was killed by a popular uprising which overran the barracks and dragged his corpse in the streets . San Martín was appointed to the armies of Andalucía , and led a battalion of volunteers . In June 1808 his unit is incorporated into a guerrilla force led by Juan de la Cruz Mourgeón . He was nearly killed during the battle of Arjonilla , but was saved by Sergeant Juan de Dios . On 19 July 1808 , Spanish and French forces engaged in the battle of Bailén , a Spanish victory that allowed the Army of Andalusia to attack and seize Madrid . For his actions during this battle , San Martín was awarded a gold medal , and his rank raised to lieutenant colonel . On 16 May 1811 , he fought in the battle of Albuera under the command of general William Carr Beresford . By this time , the French armies held most of the Iberian Peninsula under their control , except for Cádiz . San Martín resigned from the Spanish army , for controversial reasons , and moved to South America , where he joined the Spanish American wars of independence . Historians propose several explanations for this action : the common ones are that he missed his native country , that he was a British agent and the congruence of the goals of both wars . The first explanation suggests that when the wars of independence began San Martín thought that his duty was to return to his country and serve in the military conflict . The second explanation suggests that Britain , which would benefit from the independence of the South American countries , sent San Martín to achieve it . The third suggests that both wars were caused by the conflicts between Enlightenment ideas and absolutism , so San Martín still waged the same war ; the wars in the Americas only developed separatist goals after the Spanish Absolutist Restoration . San Martín was initiated in the Lodge of Rational Knights in 1811 . They met at the house of Carlos María de Alvear , other members were José Miguel Carrera , Aldao , Blanco Encalada and other " criollos " , American - born Spaniards . They agreed to return to their home countries and join the local revolutionary movements . San Martín asked for his retirement from the military , and moved to Britain . He stayed in the country for a short time , and met many other South Americans at a lodge held in a house at 28 Grafton Street . Then he sailed to Buenos Aires aboard the frigate " George Canning " , along with the South Americans Alvear , Francisco José de Vera and Matías Zapiola , and the Spaniards Francisco Chilavert and Eduardo Kailitz . They arrived on March 9 , 1812 , to serve under the First Triumvirate . South America . Argentina . A few days after his arrival , San Martín was interviewed by the First Triumvirate . They appointed him as lieutenant colonel of cavalry , and requested the creation of a cavalry unit , as Buenos Aires did not have a good cavalry . He began to organize the Regiment of mounted grenadiers with Alvear and Zapiola . As Buenos Aires was lacking professional military leaders , San Martín was trusted with the protection of the whole city , but kept focused in the task of building the military unit . San Martín , Alvear and Zapiola established a local branch of the Lodge of Rational Knights , along with morenists , the former supporters of the late Mariano Moreno . This lodge sought to promote the liberal ideas ; the high secrecy does not allow to clarify if it was a real Masonic lodge or just a lodge with political goals . It had no ties to the Premier Grand Lodge of England . San Martín got married as well with María de los Remedios de Escalada , a 14 year - old girl from one of the local wealthy families . The lodge organized the Revolution of October 8 , 1812 when the terms of office of the triumvirs Manuel de Sarratea and Feliciano Chiclana ended . Juan Martín de Pueyrredón promoted antimorenist new members , Manuel Obligado and Pedro Medrano , by preventing the vote of three deputies and thus achieving a majority . As this caused a commotion , San Martín and Alvear intervened with their military force , and the Buenos Aires Cabildo disestablished the triumvirate . It was replaced by the Second Triumvirate , with the triumvirs Juan José Paso , Nicolás Rodríguez Peña and Antonio Álvarez Jonte . The new triumvirate called the Assembly of the Year XIII and promoted San Martín to colonel . San Lorenzo . Montevideo , on the other shore of the Río de la Plata , was still a royalist stronghold . José Rondeau laid siege to it , but the Montevidean navy eluded it by pillaging nearby cities . San Martín was sent with the new Regiment to watch the activities in the Paraná River shore . The Regiment followed the navy from a distance , avoiding detection . They hid in the San Carlos Convent , in San Lorenzo , Santa Fe . San Martín watched the enemy ships from the top of the convent during the night . The royalists disembarked at dawn , ready to pillage and the regiment charged into battle . San Martín employed a pincer movement to trap the royalists . He led one column and Justo Bermúdez the other . San Martín ' s horse was killed during the battle , and his leg was trapped under the corpse of the animal after the fall . A royalist , probably Zabala himself , attempted to kill San Martín while he was trapped under his dead horse where he suffered a saber injury to his face , and a bullet wound to his arm . Juan Bautista Cabral and Juan Bautista Baigorria intervened and saved San Martín ' s life . Cabral was mortally wounded during the rescue , and died shortly afterwards . The battle did not have a notable influence on the war and did not prevent further pillages . Montevideo was finally subdued by William Brown during the Second Banda Oriental campaign . Antonio Zabala , the leader of the Montevidean army , served under San Martín during the crossing of the Andes years later . Army of the North . Once again in Buenos Aires , San Martín and his wife attended to the first official play of the Argentine National Anthem , on May 28 , 1813 at the Coliseo Theater . Oral tradition has it that the premiere took place on May 14 , 1813 at the home of aristocrat Mariquita Sánchez de Thompson , with San Martín also attending , but there is no documentary evidence of that . The lyrics of the new anthem included several references to the secessionist will of the time . Although they were still allies , San Martín began to distance himself from Alvear , who controlled the Assembly and the lodge . Alvear opposed the merchants and the Uruguayan caudillo José Gervasio Artigas , San Martín thought that it was risky to open such conflicts when the royalists were still a threat . The Army of the North , which was operating at the Upper Peru , was defeated at the battles of Vilcapugio and Ayohuma , so the triumvirate appointed San Martín to head it , replacing Manuel Belgrano . San Martín and Belgrano met at the Yatasto relay . The army was in poor condition , and San Martín initially refused to remove Belgrano from the army , as it would hurt the soldiers ' morale . However , the supreme director Gervasio Posadas ( who replaced the triumvirate in government ) insisted , and San Martín acted as instructed . San Martín stayed only a few weeks in Tucumán , reorganizing the army and studying the terrain . He also had a positive impression of the guerrilla war waged by Martín Miguel de Güemes against the royalists , similar to the Peninsular War . It was a defensive war , and San Martín trusted that they could prevent a royalist advance in Jujuy . San Martín had health problems in April 1814 , probably caused by hematemesis . He temporarily delegated the command of the Army to colonel Francisco Fernández de la Cruz and requested leave to recover . He moved to Santiago del Estero , and then to Córdoba where he slowly recovered . During this time King Ferdinand VII returned to the throne , began the absolutist restoration and began to organize an attack on the rogue colonies . After an interview with Tomás Guido , San Martín came up with a plan : organize an army in Mendoza , cross the Andes to Chile , and move to Peru by sea ; all while Güemes defended the north frontier . This would place him in Peru without crossing the harsh terrain of Upper Peru , where two campaigns had already been defeated . To advance this plan , he requested the governorship of the Cuyo province , which was accepted . He took office on September 6 . Governor of Cuyo . The absolutist restoration in Spain and the growing influence of Artigas generated a political crisis in Buenos Aires , forcing Posadas to resign . Alvear became the new Supreme Director , but had to resign after three months . San Martín ' s plan was complicated as well by the Disaster of Rancagua , a royalist victory that restored absolutism in Chile , ending the " Patria Vieja " period . San Martín initially proposed a regular - sized army , simply to reinforce Chile , but changed to propose a larger one , to liberate the country from the occupation . Chileans Bernardo O ' Higgins , José Miguel Carrera , Luis Carrera and Manuel Rodríguez , the leaders of the deposed Chilean rule , sought refugee in Cuyo , along with their armies . O ' Higgins and Rodríguez were well received , but the Carrera brothers intended to act as a government in exile . They ignored the local laws of Cuyo , and their soldiers committed acts of vandalism . San Martín imprisoned them and sent them to Buenos Aires . They proposed a plan to liberate Chile , different to the one outlined by San Martín , who rejected it as impractical . This initiated a rivalry between the Carrera and San Martín . San Martín began immediately to organize the Army of the Andes . He drafted all the citizens who could bear arms and all the slaves from ages 16 to 30 , requested reinforcements to Buenos Aires , and reorganized the economy for war production . He took another leave to restore his health four months after taking power , so Alvear appointed Gregorio Perdriel . This appointment was resisted by the Mendoza Cabildo , which ratified San Martín . The government of San Martín repeated some of the ideas outlined in the " Operations plan " , drafted by Mariano Moreno at the beginning of the war . A combination of incentives , confiscations and planned economy allowed the country to provision the army : gunpowder , pieces of artillery , mules and horses , food , military clothing , etc . Mining increased , with increased extraction of lead , copper , saltpeter , sulfur and borax , which had several usages and improved local finances . Hundreds of women wove clothing used by the soldiers . Father José Luis Beltrán headed a military factory of 700 men , which produced rifles and horseshoes . San Martín stayed on good terms with both the government of Buenos Aires and the provincial " caudillos " , without fully allying with either one . He was able to receive provisions from both . He considered that the war of independence took priority over the civil wars . The army was not ready as of the summer of 1815 , delaying the crossing . Given the harsh conditions on the mountains , the crossing could only be done in the summer season , when there is less snow . Buenos Aires did not send more provisions after the ousting of Alvear . San Martín proposed to resign and serve under Balcarce , if they would support the campaign . San Martín and Guido wrote a report in the autumn of 1816 , detailing to the Supreme Director Antonio González de Balcarce the full military plan of operations . San Martín proposed that the country declare independence immediately , before the crossing . That way , they would be acting as a sovereign nation , and not as a mere rebellion . He had great influence over the Congress of Tucumán , a Congress with deputies from the provinces , which was established in March 1816 . He opposed the appointment of José Moldes , a soldier from Salta who was against the policies of Buenos Aires , as he feared Moldes would break national unity . He rejected proposals to be appointed Supreme Director himself . He supported his friend and lodge member Juan Martín de Pueyrredón for the office . Pueyrredón resumed the military aid to Cuyo . The Congress of Tucumán declared independence on July 9 , 1816 . Congress discussed the type of government of the United Provinces of the Río de la Plata ( modern Argentina ) . General Manuel Belgrano , who had made a diplomatic mission to Europe , informed them that independence would be more easily acknowledged by the European powers if the country established a monarchy . For this purpose , Belgrano proposed a plan to crown a noble of the Inca Empire as king ( the Sapa Inca dynasty had been dethroned in the 16th century ) . San Martín supported this proposal , as well as Güemes and most deputies , except for those from Buenos Aires , who undermined the project and prevented its approval . Needing even more soldiers , San Martín extended the emancipation of slaves to the ages from 14 to 55 , and even allowed them to be promoted to higher military ranks . He proposed a similar measure at the national level , but Pueyrredón encountered severe resistance . He included as well the Chileans who escaped Chile after the disaster of Rancagua , and organized them in four units , each one of infantry , cavalry , artillery and dragoons . At the end of 1816 , the Army of the Andes had 5 , 000 men , 10 , 000 mules and 1 , 500 horses . San Martin organized military intelligence , propaganda and disinformation to confuse the royalist armies ( such as the specific routes taken in the Andes ) , boost the national fervor of his army and promote desertion among the royalists . Crossing of the Andes . Although the Congress of Tucumán had already formalized the flag of Argentina , the Army of the Andes did not use it , choosing a banner with two columns , light blue and white , and a coat of arms roughly similar to the Coat of arms of Argentina . The army did not use the flag of Argentina because it was not exclusively an Argentine army . Contrary to the common understanding , the crossing of the Andes was not the first time that a military expedition crossed the mountain range . The difference from previous operations was the size of the army , and that it had to be ready for combat right after the crossing . The army was divided in six columns , each taking a different path . Colonel Francisco Zelada in La Rioja took the Come - Caballos pass towards Copiapó . Juan Manuel Cabot , in San Juan , moved to Coquimbo . Ramón Freire and José León Lemos led two columns in the south . The bulk of the armies left from Mendoza . San Martín , O ' Higgins and Soler led a column across the Los Patos pass , and Juan Gregorio de Las Heras another one across the Uspallata Pass . The whole operation took nearly a month . The armies took dried food for the soldiers and fodder for the horses , because of the inhospitable conditions . They also consumed garlics and onions , to prevent altitude sickness . Only 4 , 300 mules and 511 horses survived , less than half the original complement . Martín Rodríguez had returned to Chile before the crossing , and began a guerrilla war in Santiago de Chile against the royalists , in support of the upcoming army . He was supported in the south of the city and the countryside . The strategy was to occupy nearby villages , seize the royalists ' weapons and flee . The attacks on Melipilla and San Fernando , and a failed one at Curicó , demoralized the royalists . Chile . Battle of Chacabuco . The columns that crossed the Andes began to take military actions . The column in the north led by Cabot defeated the royalists in Salala , seized Coquimbo and then Copiapó . In the south , Freire captured Talca . Las Heras routed royalist outposts in Juncalito and Potrerillos . Bernardo O ' Higgins , who came from Los Patos pass , defeated the royalists at Las Coimas . This allowed the main columns to gather at Aconcagua valley , meeting at the slopes of Chacabuco . Royalist commander Rafael Maroto converged his armies on that location as well . Maroto had 2 , 450 men and 5 pieces of artillery , San Martín had 3 , 600 men and 9 pieces of artillery . The misdirection that concealed the path of the bulk of the Army allowed San Martín this advantage , as other royalist forces were scattered in other regions of Chile . The battle began on February 12 . San Martín organized a pincer movement , with Soler leading the west column and O ' Higgins the east one . O ' Higgins , eager to avenge the defeat at Rancagua , rushed to the attack , instead of coordinating with Soler . This gave the royalists a brief royalist advantage . San Martín instructed Soler to rush the attack as well . The combined attack was successful and San Martín ' s column secured the final victory . The battle ended with 600 royalists dead and 500 prisoners , with only 12 deaths and 120 injuries in the Army of the Andes . The army triumphantly entered Santiago de Chile the following day . Governor Francisco Marcó del Pont attempted to escape to Valparaíso and sail to Peru , but he was captured on 22 February and returned to Santiago . Several other officials were captured as well and sent as prisoners to San Luis , Argentina . San Martín sent Marcó del Pont prisoner to Mendoza . Patria Nueva . Three deputies from Coquimbo , Santiago and Concepción organized a new government , and proposed San Martín as Supreme Director of Chile . He declined the offer and proposed O ' Higgins in his stead : he recommended that the Supreme Director should be someone from Chile . San Martín would instead organize the navy to take the fight to Peru . He established a local chapter of the lodge of Rational Knights , named as Logia Lautaro , in reference to mapuche leader Lautaro . The victory in Chacabuco did not liberate all Chile . Royalist forces still resisted in southern Chile , allied with the mapuches . Las Heras occupied Concepción , but failed to occupy Talcahuano . The royalist resistance lasted for several months , and Talcahuano was only captured when most of the continent was already free . San Martín left O ' Higgins in charge of the Army , and returned to Buenos Aires to request resources for the campaign to Peru . He did not have a good reception this time . Pueyrredón thought that Chile should compensate Buenos Aires for the money invested in their liberation , as the support to San Martín reduced the support to Belgrano , and the Portuguese - Brazilian invasion of the Eastern Bank menaced Buenos Aires . Incapable of financial support , Buenos Aires sent lawyer Manuel Aguirre to the United States , to request aid and acknowledge the declaration of independence . However , the mission failed , as the United States stayed neutral in the conflict because they negotiated the purchase of Florida with Spain . The Chilean José Miguel Carrera had obtained ships on his own after the disaster of Rancagua , which he intended to use to liberate Chile ; but as San Martín had already done that , he refused to place his fleet under the Army of the Andes . Carrera was an enemy of O ' Higgins and sought to navigate to Chile and depose him , so Pueyrredón imprisoned him , and confiscated his ships . San Martín requested help from British Admiral William Bowles . He wrote from Chile and expected to find him in Buenos Aires , but Bowles had embarked for Río de Janeiro . Bowles considered that San Martín was more trustworthy than Alvear , and praised his monarchism . San Martín did not obtain the ships and interrupted the correspondence with Bowles for some months . He returned to Chile ; his wife Remedios stayed in Buenos Aires with her daughter Mercedes because of her health problems . Unable to get help from either Buenos Aires or foreign powers , San Martín promoted a more decisive commitment from Chile to finance the navy . Battle of Cancha Rayada . The failure to liberate Talcahuano was followed by naval reinforcements from the North . The viceroy of Peru sent Mariano Osorio in an attempt to reconquer Chile . The royalists would then advance by land to the northern Chile . San Martín thought that it was not possible to defend Concepción , so he ordered O ' Higgins to leave the city . 50 , 000 Chileans took cattle and grain and moved north , burning everything else , so that they did not leave supplies for the royalists . As he had done with the Tucumán Congress , San Martín urged a declaration of independence , to legitimize the government and the military actions . The Chilean Declaration of Independence was issued on 18 February 1818 , one year after the battle of Chacabuco . San Martín , Las Heras and Balcarce met in Curicó , and the royalists in Talca , in a plain known as " Cancha rayada " . As the patriots had a numeric advantage , 7 , 000 against 4 , 600 , Osorio tried to avoid open battle , and tried instead a stealth operation . A spy informed San Martín that Osorio would make a surprise attack in the night , but the army could not be prepared in time . 1 , 000 soldiers fled , 120 died , and San Martín ' s assistant was killed . O ' Higgins tried to resist with his unit , but retired when he was shot in the arm . Las Heras managed to retire his army in order , saving his 3 , 500 men . The patriots escaped to Santiago . Despite the defeat , the soldiers were received as heroes in Santiago . Thanks to Las Heras , a potential disaster for the patriot armies turned into a minor setback . The army was reorganized again , but the deaths , injuries and desertions caused by the defeat at Cancha Rayada reduced its size to 5 , 000 soldiers , which was closer to the royalist forces . They took position next to the Maipo River , near Santiago . Battle of Maipú . San Martín made a brief reconnaissance of the royalist army , and noticed several flaws in their organization . Feeling secure of victory , he claimed that " Osorio is clumsier than I thought . Today ' s triumph is ours . The sun as witness ! " . The battle began at 11 : 00 am . The patriot artillery on the right fired on the royalist infantry on the left . Manuel Escalada led mounted grenadiers to capture the royalist artillery , turning them against their owners . Burgos ' regiment severely punished the patriot left wing , mainly composed of emancipated slaves , and took 400 lives . San Martín ordered the mounted grenadiers led by Hilarión de la Quintana to charge against the regiment . The firing suddenly ended and royalists began to fight with sword bayonets , under the cries " Long live the king ! " and " Long live the homeland ! " respectively . Finally , the royalists ended their cries and began to disperse . When the regiment of Burgos realized that their line was broken , they stopped resisting , and the soldiers began to disperse . The cavalry pursued and killed most of them . At the end of the battle , the royalists had been trapped among the units of Las Heras in the west , Alvarado in the middle , Quintana in the east and the cavalries of Zapiola and Freire . Osorio tried to fall back to the hacienda " Lo Espejo " but could not reach it , so he tried to escape to Talcahuano . Ordóñez made his last stand at that hacienda , where 500 royalists died . The battle ended in the afternoon . O ' Higgins , still injured by the wound received in Cancha Rayada , arrived during the final action at the hacienda . He claimed " Glory to the savior of Chile ! " , in reference to San Martín , who praised him for going to the battlefield with his unhealed wound . They made an embrace on their horses , now known as the " Embrace of Maipú " . The battle of Maipú secured Chilean independence . Except for Osorio , who escaped with 200 cavalry , all top royalist military leaders were captured . All their armed forces were either killed or captured , and all their artillery , weapons , military hospitals , money and resources were lost . The victory was praised by Güemes , Bolívar and the international press . Fleet of the Pacific . San Martín made a new request for ships to Bowles , but received no answer . He moved again to Buenos Aires , to make a similar request . He arrived to Mendoza a few days after the execution of the Chilean Luis and Juan José Carrera , brothers of José Miguel Carrera . The specific initiative of those executions is controversial . Chilean historian Vicuña Mackenna indicts San Martín , while J . C . Raffo de la Reta blames O ' Higgins instead . Manuel Rodríguez was also imprisoned and then killed in prison ; this death may have been decided by the Lautaro lodge . San Martín could not have taken part in it , as he was already on the way to Buenos Aires . San Martín was not well received in Buenos Aires . Pueyrredón initially declined to give further help , citing the conflicts with the federal caudillos and the organization of a huge royalist army in Cádiz that would try to reconquer the La Plata basin . He thought that Chile should organize the navy against Peru , not Buenos Aires . San Martín discussed with him and finally got financing of 500 , 000 pesos . He returned to Mendoza with his wife and daughter and received a letter from Pueyrredón , who said that Buenos Aires could only deliver one - third of the promised funds . This complicated the project , as neither Santiago de Chile nor Mendoza had the resources needed . San Martín resigned from the Army , but it is unclear whether his decision to resign was sincere or was to apply pressure to his backers . The government of Buenos Aires still considered San Martín vital to the national defense , so Pueyrredón agreed to pay the 500 , 000 pesos requested , and encouraged San Martín to withdraw his resignation . San Martín proposed to mediate between Buenos Aires and the Federal League led by Artigas . He thought that the civil war was counter - productive to national unity , and that an end to hostilities would free resources needed for the navy . He calculated that Artigas might condition the peace on a joint declaration of war to colonial Brazil ; so San Martín proposed to defeat the royalists first and then demand the return of the Eastern Bank to the United Provinces . O ' Higgins recommended caution , fearing that San Martín might be captured . Pueyrredón rejected the mediation , as he did not recognize Artigas as an equal to negotiate with him . Act of Rancagua . Although Artigas was defeated by the Luso - Brazilian armies , his allies Estanislao López and Francisco Ramírez continued hostilities against Buenos Aires for its inactivity against the invasion . Pueyrredón called the Army of the Andes and the Army of the North ( led by Belgrano ) to aid Buenos Aires in the conflict . Guido noted to San Martín that if both armies did that , the north of Argentina and Chile would be easily reconquered by the royalists . San Martín also knew that most of the soldiers of the Army of the Andes would not be willing to aid Buenos Aires in the civil war , as most were from other provinces or from Chile . San Martín had doubts as well about the projected arrival of a large military expedition from Spain , as the absolutist restoration of Ferdinand VII had met severe resistance in Spain . San Martín finally kept the Army in Chile when Belgrano ' s lieutenant Viamonte signed an armistice with López ; he thought that the conflict had ended . However , the minister of war Matías de Irigoyen ordered once more the return of the Army of the Andes , and appointed Francisco Fernández de la Cruz as its leader , displacing San Martín . San Martín resigned again , and observed that the Army would not be able to cross the Andes from Chile to Buenos Aires because the winter snow was blocking the trails . All the leaders of the military units of the Army of the Andes refused to go to Buenos Aires , as their soldiers would mutiny or desert . Facing both the resignation of San Martín and the refusals to obey the orders , the Supreme Director canceled the orders , and the Army of the Andes stayed in Chile . With the sanction of the Argentine Constitution of 1819 , Pueyrredón ended his mandate as Supreme Director , replaced by José Rondeau . The navy was finally completed in Chile , and British Earl Thomas Cochrane was appointed as to lead it . But it was not sent to Peru immediately : there were still rumors of an attack from Spain , and if needed the navy would move to Buenos Aires and fight the Spanish ships . The civil war resumed and San Martín attempted once more to mediate , to no effect . Rondeau again requested the return of the Army of the Andes , without success . San Martín returned to Chile and prepared to take part in the naval actions against Peru , ignoring Buenos Aires . The Army of the North refused to join the conflict as well , revolting in Arequito and disbanding . Without either reinforcements , Rondeau was defeated by federal forces in the Battle of Cepeda . The Congress of Tucumán and the office of the Supreme Director of the United Provinces of the Río de la Plata were dissolved and the country turned into a confederation of 13 provinces , without a central state . This period is known as the " Anarchy of the year XX " . The rebellion of Spanish general Rafael del Riego and an outbreak of yellow fever in the punitive expedition organized in Cádiz ended the royalist threat to Buenos Aires . The Act of Rancagua invested San Martín with the full authority over the Army of the Andes , as it now lacked a national authority over it . Peru . Peru had nearly fourfold the forces of San Martín : 6 , 244 soldiers in Lima , 8 , 000 at the northern provinces , 1 , 263 in the coast , 1 , 380 in Arequipa and 6 , 000 in the Upper Peru ; nearly 23 , 000 soldiers in total . The Army of the Andes had 4 , 000 soldiers instead , and Cochrane ' s navy another 1 , 600 . With this disparity of forces , San Martín tried to avoid battles . He tried instead to divide the enemy forces in several locations , as he did during the Crossing of the Andes , and trap the royalists with a pincer movement with either reinforcements of the Army of the North from the South or the army of Simón Bolívar from the North . He also tried to promote rebellions and insurrection within the royalist ranks , and promised the emancipation of any slaves that deserted their Peruvian masters and join the army of San Martín . The spreading of the news of the Liberal Triennium , a liberal rebellion in Spain that reinstated the Spanish Constitution of 1812 , also sought to undermine royalist loyalty . The navy sailed from Chile on August 20 , 1820 . It was composed of eight warships , eleven gunboats , 247 cannons and a crew of 1 , 600 , most of them Chileans . There were 12 frigates , and a brig with the 4 , 000 soldiers of the Army of the Andes . San Martín was the leader of the military expedition . They landed in Paracas , 200 km to the south of Lima , on September 7 , and occupied the nearby city of Pisco , which was abandoned by the royalists . Expedition of Peru . Peruvian viceroy Joaquín de la Pezuela had instructions from Spain to negotiate with the patriots . Under an armistice the opponents celebrated a meeting in Miraflores . The viceroy ' s deputies proposed to adopt the liberal Spanish constitution if San Martín left the country , but his deputies requested instead that Spain grant the independence of Peru . The negotiations did not bear fruit . San Martín isolated Lima from the surrounding countryside , and sent Juan Antonio Álvarez de Arenales to promote rebellions among the natives . The Army of the Andes moved north of Lima by sea . San Martín and Arenales besieged the city from two directions , and Cochrane attacked the port of El Callao . Cochrane captured the ship " Esmeralda " , and the royalist regiment Numancia . Nearly 700 expeditionary soldiers of New Granada deserted and joined the patriots . Several populations in the north of Peru supported San Martín , and Arenales defeated the royalists at the battle of Pasco . More than 300 royalists joined the patriots , including Andrés de Santa Cruz . However , the plans did not fully work as intended . The native populations that joined Arenales could not resist the royalist counter - attacks , and the slaves did not join the army in the expected numbers . The Argentine provinces could not send the supporting army that San Martín had requested earlier , and the Army of the North no longer existed . As a result , he wrote to Simón Bolívar , trying to coordinate actions with him . Pezuela was deposed by a military - liberal coup , and José de la Serna e Hinojosa became the new viceroy . De la Serna called San Martín to negotiate an end of hostilities . The result was the same than with Pezuela : De la Serna proposed to enact the 1812 Spanish constitution ( Perú inside Spain ) , and San Martín demanded the independence of Peru ( with an independent monarchy ) . The rejection of the Spanish constitution was motivated by the disproportional representation of the Americas in the Constituent Assembly that wrote it . Both armies agreed a temporary armistice . San Martín proposed to establish an constitutional monarchy with a European monarch , with a regency ruling in the interim . The proposal was rejected , on the grounds that they could not accept it without Ferdinand ' s approval . Protector of Peru . As hostilities renewed , San Martín organized several guerrilla groups in the countryside , and laid siege to Lima , but did not force his entry , as he did not want to appear as a conqueror to the local population . However , De la Serna suddenly left the city with his army , for unknown reasons . San Martín called for an open cabildo to discuss the independence of the country , which was agreed . With this approval , the authority in Lima , the support of the northern provinces and the port of El Callao under siege , San Martín declared the independence of Peru on 28 July 1821 . The war , however , had not ended yet . Unlike Chile , Peru had no local politicians of the stature of O ' Higgins , so San Martín became the leader of the government , even though he did not want to . He was appointed Protector of Peru . As Peruvian society was highly conservative , San Martín did not take the liberal ideas too far immediately . The provisional statutes contained few changes and ratified several existing laws . All the types of servitude imposed on the natives , such as mita and yanaconazgo , were abolished , and the natives received citizenship . He did not abolish slavery completely , as Peru had 40 , 000 slaveowners , and declared " freedom of wombs " instead , which emancipated the sons of slaves ; he emancipated as well the slaves of the royalists who left Lima . He also abolished the Inquisition and corporal punishment , and enacted freedom of speech . During his stay in Peru , San Martín had a romance with Rosa Campuzano , a woman from Guayaquil . The royalist armies that stayed in the Peruvian countryside headed to Lima , led by Canterac . In a confusing episode , there was no battle , as neither one attacked . Canterac changed his path to El Callao , took resources from it , and returned to his base . There was no battle during their return either . Without resources , El Callao surrendered in a few days . Both armies took unadvisable actions : San Martín allowed Canterac to receive reinforcements , and Canterac left a key military objective incapable to resist . There is no known documentation that provides a reasonable explanation of those events . Cochrane had several disputes with San Martín . He discussed several of his actions and tried to bypass his authority . During the blockade of El Callao , he proposed that O ' Higgins take control of the mission and send any spoils of battle to Chile . As San Martín was appointed Protector of Peru , Cochrane reasoned that San Martín was no longer under Chilean command , and took the navy away . In later years Cochrane made accusations against San Martín in Chile . Bolívar took control of Caracas with his victory at the battle of Carabobo , and the Congress of Cúcuta issued laws similar to those in Perú . Guayaquil declared independence , and Bolivar sent Antonio José de Sucre to reinforce them . Sucre ' s forces were not enough , and requested help from San Martín . Peru sent a military force of 1 , 300 men . Bolívar entered the city a month later , and claimed that for historical reasons Quito should be part of Colombia . San Martín and Bolívar sought to generate Latin American integration , but disagreed on the type of government : Bolívar proposed a republic , and San Martín a constitutional monarchy , reasoning that it would be easier to receive international recognition for the now - independent South American nations . Peru and Colombia signed a treaty of integration , to be proposed to Chile , the United Provinces of the Río de la Plata and Paraguay , and at a later point to the United Provinces of Central America and the Empire of Brazil . Guayaquil conference . San Martín thought that if he joined forces with Bolívar he would be able to defeat the remnant royalist forces in Peru . Both liberators would meet in Quito , so San Martín appointed Torre Tagle to manage the government during his absence . Bolivar was unable to meet San Martín at the arranged date , so San Martín returned to Lima , but still left Tagle in government . Bolívar moved from Quito to Guayaquil , which secured its independence . There were discussions on the future of the region : some factions wanted to join Colombia , others to join Peru , and others to become a new nation . Bolívar ended the discussion by annexing Guayaquil into Colombia . There was Peruvian pressure on San Martín to do a similar thing , to annex Guayaquil to Peru . The Guayaquil conference took place on July 26 , 1822 . They had two private meetings , on that day and the following one . As there were no witnesses or minutes , the content of their discussions can only be inferred from their later actions and their letters to other people . Some likely topics of discussion may have been a request of reinforcements , and an offer to combine the armies into a single one , with San Martín ranked second to Bolívar . The minister Bernardo Monteagudo was removed from office by a Peruvian rebellion , during San Martín ' s absence . San Martín resigned as Protector of Peru a few days later and returned to Valparaíso , Chile . Several reason influenced him to resign . The military discipline of the Army of the Andes was compromised , but San Martín was reluctant to take drastic action against his officers . The authority of San Martín and Bolívar , and the local rivalry of their respective countries Peru and Colombia , limited their options for joint work : Colombians would not have liked Bolívar to give many of his forces to San Martín , whilst Peruvians would not have liked their Protector to be second in command to Bolívar , and a joint command would complicate the maintenance of military discipline . Unlike Bolívar , backed up by the Colombian government , San Martín did not have more resources than those he already had : Buenos Aires denied him any support , the other Argentine governors ( such as Juan Bautista Bustos ) supported him but did not have resources to provide , O ' Higgins was about to be deposed in Chile , and Coachrane took the navy and left him without naval power . Finally , he felt that only a very strong authority would be able to prevent balkanization , but refused to rule as a dictator himself . Later life . After his retirement , San Martín intended to live in Cuyo . Although the war of independence had ended in the regions , the Argentine Civil Wars continued . The unitarians wanted to organize the country as a unitary state centered on Buenos Aires , and the federals , who preferred a federation of provinces . San Martín had good relations with the federal " caudillo s " and a personal feud with unitarian leader Bernardino Rivadavia , but tried to stay neutral . San Martín ' s wife , María de los Remedios de Escalada , died in 1823 , so he returned to Buenos Aires . He took his daughter Mercedes Tomasa , who was living with her mother ' s family , and sailed to Europe . After a failed attempt to settle in France , he moved to Britain and then to the capital of present day Belgium , Brussels , where he settled . He intended to live there until Mercedes completed her education and then return to Argentina . Rivadavia visited Brussels and San Martín intended to challenge him to a duel , but was dissuaded by Diego Paroissien . Despite his feud with Rivadavia , who was appointed President of Argentina , San Martín offered his military services in the War with Brazil , but received no response . He sailed to the country when Rivadavia was deposed and replaced by the federal Manuel Dorrego , and the war ended in the interim . He intended to return anyway , as a federal government would spare him the persecution he would otherwise have received from the unitarians . He was unable to do as he planned . When his ship docked in Río de Janeiro he was informed that the unitarian Juan Lavalle had deposed Dorrego , and when he reached Montevideo he was informed that Lavalle had captured and executed Dorrego and begun a campaign of terror against all federals in the country . The ship arrived in Buenos Aires , but San Martín did not leave it , instead returning to Montevideo . Lavalle was unable to put down the federal rebellion against him , and offered San Martín the government . San Martín declined and returned to Brussels . By this time the federal Juan Manuel de Rosas had begun to pacify the civil war started by Lavalle and earned San Martín ' s admiration . They began to exchange friendly letters . The Belgian Revolution and the cholera epidemic of 1831 made San Martín leave Brussels and move to Paris , where both San Martín and his daughter became ill . They were helped by Mariano Balcarce . Mariano married Mercedes , and they had a daughter , María Mercedes . In 1837 France began a blockade of the Rio de la Plata against Rosas . San Martín offered his military services to Rosas , which was declined because of San Martín ' s advanced age , and condemned the role of the unitarians in that conflict , as they had allied themselves with France against their own nation . San Martín bequeathed his curved saber to Rosas , because of his successful defense of the country . The conflict between France and Argentina renewed in the Anglo - French blockade of the Río de la Plata , which San Martín condemned as well . During this time he met Florencio Varela and Domingo Faustino Sarmiento . During the 1848 revolution , San Martin left Paris and moved to Boulogne - sur - Mer , a small city in northern France . He was almost blind and had many health problems because of his advanced age , but continued to write letters and keep in touch with the news from South America . Shortly after receiving the news of the Argentine victory against the Anglo - French blockade , he died , three o ' clock on 17 August 1850 . Remains . José de San Martín died on 17 August 1850 , in his house at Boulogne - sur - Mer , France . He requested in his will to be taken to the cemetery without any funeral , and to be moved to Buenos Aires thereafter . Balcarce informed Rosas and the foreign minister Felipe Arana of San Martín ' s death . Balcarce oversaw the embalming of his remains and their temporary stay in a chapel of the city . He also sent San Martin ' s saber to Rosas . However , the rebellion of Justo José de Urquiza against Rosas in 1851 , Rosas ' defeat at the battle of Caseros and the resulting chaos delayed the move of San Martín ' s remains to Buenos Aires . Still , both Rosas and Urquiza organized public homages to San Martín , despite the conflict . Buenos Aires seceded from Argentina as the state of Buenos Aires , dominated by Unitarians who despised San Martín . Thus , the move of his remains was postponed indefinitely . Aware that there were no favorable conditions for the project , Balcarce arranged a creation of a tomb in the Boulogne - sur - Mer cemetery . San Martín ' s remains were finally repatriated on 29 May 1880 , during the presidency of Nicolás Avellaneda . The mausoleum was placed inside the Buenos Aires Metropolitan Cathedral . As San Martín was suspected of being a freemason , the mausoleum was placed in an expanded wing of the Cathedral . Legacy . San Martín was first acclaimed as a national hero of Argentina by the Federals , both during his life and immediately after his death . The unitarians still resented his refusal to aid the Supreme Directors with the Army of the Andes and his constant support to Rosas . The unitarian Bartolomé Mitre wrote a biography of San Martín , " " Historia de San Martín y de la emancipación sudamericana " " ( ) . By that time , several accounts of San Martín were under way in many countries : Valentín Ledesma from Lima wrote in 1853 about San Martín ' s campaign in Peru , and Benjamín Vicuña Mackenna from Chile wrote in 1856 about the Chilean War of Independence . With Mitre ' s book , San Martín was universally acclaimed as the Liberator of Argentina , but his work introduced several inaccuracies to make San Martín ' s campaign support Mitre ' s political project . These inaccuracies were detected and fixed by later historians . Statues of San Martín appear in most cities of Argentina , as well as in Santiago de Chile and Lima . José Gil de Castro made the first portrait of San Martín , and several other artists made works about him . The most important films featuring San Martín are the 1970 " El Santo de la Espada " and the 2010 " " .