One of the first uprisings that questioned Spanish power over the Viceroyalty of Peru was the Rebellion of Tupac Amaru II in 1780. Royalist forces squashed this initial uprising, but it would lay the groundwork for further rebellion. Subsequently, insurrections such as the Tacna Rebellion of 1811 and the Cuzco Rebellion of 1814 further radicalized the population. Because Spanish colonial power in America was mainly concentrated in the Viceroyalty of Peru, the intervention of foreign forces was necessary for the revolution to be successful. The Liberating Expedition of Peru, commanded by General José de San Martin, was one such intervention. Martin's forces were successful in occupying the capital city of Lima in 1820, and Peruvian Independence was declared on 28 July 1821. In 1824, the independence process was finalized with the help of Simón Bolívar and the signing of the Capitulation of Ayachucho in 1824.