On December 9.1824 ; Patriot forces led by General Antonio José de Sucre defeat a Royalist army in the Battle of Ayacucho, putting an end to the Peruvian War of Independence.