The Peruvian judiciary is a hierarchical system of courts, with the Supreme Court of Peru at the top. The second level is composed of 28 superior courts, each of which has jurisdiction over a judicial district which are more or less synonymous to the 25 regions of Peru. The third level is formed by 195 courts of first instance (trial court), each of which has jurisdiction over a province. The fourth and lowest level is composed of 1,838 courts of peace, each with jurisdiction over a single district.
The predecessor to the judiciary of Peru was the Royal Audiencia of Lima, in the Viceroyalty of Peru. When Peru achieved independence, José de San Martín resolved that the Audencia of Lima would be used as a national court until a permanent judicial system was established. Later, Simón Bolívar established the makings of the current Judicial system, with the creation of the Superior Courts of Justice of Lima, Cusco, La Libertad, and Huamanga.