In 1542, the Spanish Crown created the Viceroyalty of Peru, which was reorganized after the arrival of Viceroy Francisco de Toledo in 1572.
Nevertheless, throughout the eighteenth century, further away from Lima in the provinces, the Spanish did not have complete control.