Once the counter offensive by the Spanish troops began in 1815, Serviez was appointed as commander in chief of the Army, while Córdova continued to serve under him. In 1816, Serviez's forces, including Córdova's battalion, were defeated and forced to retreat to the Llanos Orientales. There, General Serviez was assassinated, presumably under orders from José Antonio Páez. Córdova himself was court martialed for desertion, but avoided execution, and was subsequently restored to his rank. He was then given a command post before Simón Bolívar's arrival to Venezuela in 1816. Córdova was then sent to the Guayana Region in 1817, and Bolivar later incorporated him in his senior staff.