Lima is the "Superior Court of Justice," belonging to the Judicial District and. Due to the judicial organization of Peru, the highest concentration of courts is located in Lima despite the fact that its judicial district has jurisdiction over only 35 of the 43 districts. The "Superior Court of the Cono Norte" is the second Superior Court located in Lima and is part of the Judicial District of North Lima. This judicial district has jurisdiction over the remaining eight districts, all located in northern Lima. The city is roughly equivalent to the Province of Lima, which is subdivided into 43 districts.
Lima under General José de San Martín landed south of Lima in 1820 but did not attack the city. Faced with a naval blockade and the action of guerrillas on land, Viceroy José de la Serna e Hinojosa evacuated its capital in July 1821 to save the Royalist army. Fearing a popular uprising and lacking any means to impose order, the city council invited San Martín to enter Lima and signed a Declaration of Independence at his request. However, the war was not over; in the next two years the city changed hands several times. After independence, Lima became the capital