And after the Peruvian War of Independence , it became the capital of the Republic of Peru .
Following the Peruvian War of Independence , it became the capital of the Republic of Peru .