Once the army was formally incorporated in Huaura, it changed its name and went on to fight in the Peruvian War of Independence, most notably in the decisive Battle of Ayacucho, which consolidated the country's independence that was first declared in 1821.[2]