Shortly after this second foundation, the first great uprising occurred in 1780. The Peruvian people resisted the Spanish colonial rulers and landowners. The peasants and indigenous inhabitants demanded again more rights within and in their own country.
The uprising was led by José Gabriel Condorcanqui, also known as José Gabriel Tupaq Amaru. Although this revolt in particular was crushed. But it was the first great resistance movement, the prelude to many more throughout South America. In 1824, Spaniards were finally expelled from Peru today, among other things because Chile and Argentina, until then independent, had a great interest in a free neighbor state.
A year later followed the declaration of independence of Peru and Bolivia. In 1845, the internal political situation stabilized. Slavery was finally abolished by the then head of state, General Ramón Castilla. As a replacement for the slaves now disappeared, 100,000 Asians were brought as workers to Peru.
In addition, the general also expanded the trade in guano and nitrate fertilizers. The economic situation in the country stabilized more and more. Today, Castilla is considered the true founder of Peru. Although the Spanish made in 1864 and 1897 renewed attempts to regain power in the country again. But they were not successful. Much more fatal was the so-called “saltpeter war”, which took place between 1879 and 1883 in the country. In its wake, Peru lost the resource-rich provinces of Arica and Tarapacá to Chile. The province of Tacna remained in Chilean hands until 1929. The resulting bad economic situation in the country meant that more and more Peruvian companies and companies were acquired by American and British investors.