In February 1824, Callao was later retaken by royalty forces, which led to the extension of the blockade to the port of Chancay. The Peruvian squadron maintained a long blockade at Callao for nearly two years, during which time several raids and a confrontation with the royalty squadron took place. Although hostilities ceased with the Spanish capitation following the victory of the patriotic army at the Battle of Ayacucho on December 9, 1824, a handful of royalists would still remain in the Castle of Real Felipe under the command of Spanish General Ramón Rodil, who would finally desist from his resistance in January 1826, when he surrendered to patriotic forces, thus disappearing the last vestiges of Spanish domination in Peru.