With independence for Columbia and Venezuela secure, the Legions took part in the march across the Andes South and next fought at the Battle of Pichincha in May 1822, which secured independence for Ecuador. They also took part of the last major campaign of the Independence wars in 1824, culminating in the battles of Junín and Ayacucho in Peru, which marked the end of the Spanish rule in South America. The British Legions fought until the end of the wars, their number much depleted. Nonetheless, for a long time they were largely forgotten to history.