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.