At the same time that Frigate Captain Domingo de Monteverde was making fast and vast advances into republican territory from the west (his forces had entered Valencia on May 3, 1812), Bolívar lost control of San Felipe Castle along with its ammunition stores on June 30, when the royalist prisoners held there managed to take it over and attack the small number of troops in the city.