Baraya, however, decided to switch factions and support the federalist forces, and Caldas joined him, signing the act that declared Nariño an usurper and a tyrant, and supporting the Congress in May, 1812. Caldas was appointed as member of the Military Commission of the Congress, and was given the rank of Lieutenant Colonel, and was involved in the Battle of Ventaquemada on December 2, 1812, on which the federalist troops were victor, and in the Battle of San Victorino (or Battle of Santafé de Bogotá, San Victorino y Las Cruces), on January 9, 1813, where the federalist troops were utterly defeated.
Baraya, however, opted to switch factions and support the federalist forces, and Caldas joined him, signing an act that branded Nariño as an illegitimate ruler and a tyrant, and backing the Congress in May, 1812. Caldas was appointed to the Military Commission of the Congress and received the rank of Lieutenant Colonel, and participated in the Battle of Ventaquemada on December 2, 1812, where the federalist forces emerged victorious, and in the Battle of San Victorino (or Battle of Santafé de Bogotá, San Victorino y Las Cruces), on January 9, 1813, where the federalist troops suffered a crushing defeat.