The Crossing of the Andes () was one of the most important feats in the Argentine and Chilean wars of independence, in which a combined army of Argentine soldiers and Chilean exiles invaded Chile crossing the Andes range separating Argentina from Chile, leading to Chile's liberation from Spanish rule. Led by José de San Martín, and setting out from Mendoza – then part of the Province of Cuyo, Argentina – in January 1817, the successful crossing of the army took 21 days. Having to manage heights averaging 3,000 mts, the feat has been compared to Hannibal's or Napoleon's crossing of the Alps, and is regarded among the greatest of its kind in universal military history. Background The crossing of the Andes was a major step in the strategy devised by José de San Martín to defeat the royalist forces at their stronghold of Lima, Viceroyalty of Perú, and secure the Spanish American independence movements. The idea of crossing was already developed by secret lodges seeking the independence of South America, and was part of the Maitland Plan designed by Thomas Maitland. San Martín learned of it during his brief time in Britain, before sailing to South America. After becoming aware of the difficulty of attacking the royalist stronghold of Lima across Upper Peru, he decided to proceed with such a plan. The Captaincy General of Chile had removed their governor in 1810, and replaced him with the First Government Junta, starting a period of Chilean history known as Patria Vieja. However, they would be defeated in 1814 during the battle of Rancagua, and with the Reconquista Chile would become again a royalist stronghold. Bernardo O'Higgins and other Chilean leaders had fled to Mendoza during the new royalist government, which led to O'Higgins being part of the Army of the Andes as well as the Argentine soldiers. Troops and equipment The city of Mendoza, during this time frame, became a factoring headquarters during the pre-crossing. The citizens of Mendoza assisted their troops by manufacturing gunpowder and ammunition. They also learned to make cannons. The main food of the army was a regional meal called valdiviano. It was prepared with dry meat or charqui, sliced raw onion, potatoes and boiling water. They had designated soldiers who carried the food. These soldiers transported forty tons of charqui; maize cakes; meat; brandy, to counter the nighttime cold; garlic and onion, to deal with the