Following Peru's independence from Spain in 1821, education began to receive attention from the new national government, with José de San Martín establishing the Monitorial System as the main method of education in Peru in 1822. In 1825, Simón Bolívar expanded on the Monitorial system; he ordered the creation of a university in Trujillo, the building normal schools in the capital cities of each Peruvian department and the separation of primary and secondary educations. The 1828 Constitution of Peru promised the establishment of public education, though this was never immediately realized due to a lack of funding and political instability within the country.