 On 6 April 1823, he was promoted to lieutenant colonel.After the "Conspiración Septembrína" (September Conspiracy) of 1828, and while being military chief of the Azuay province, López rebelled against General Simón Bolívar and joined the army of Colonel José María Obando.Shortly after, the Gran Colombia-Peru War broke out, and Bolívar headed south to confront the Peruvians and join forces with Field Marshal Antonio José de Sucre, who was in wait for him.