In 1825, Bolivia was created by separating from Upper Peru.

An excerpt from the article 43 facts about Peru

In 1845, slavery was abolished in Peru, financial reform was introduced, the railway was expanded and a universal education system was created. At that time, the country was shaken by numerous coups d'état, after which presidents changed.