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