The immediate background of the judiciary in Peru is the Royal Court created by the Spanish Empire. During the Viceroyalty of Peru was divided into several divisions as the Audiencia of Charcas and the Royal Audiencia of Lima.
Realising the independence of Peru, José de San Martín decided that until the new nation did not have a national law would continue using the right Iberian therefore remained the organization of the Audiencia of Lima.
It was Simón Bolívar who established the creation of the judiciary itself through the creation of the Superior Court of Lima, the Superior Court of Cuzco, Superior Court of Justice, Freedom and Justice Superior Court of Huamanga.