 Facing the resignation of president José Fernández Madrid on June 22, 1816, the Permanent Commission of Congress, then assembled in Popayán, named in his place, general Custodio García Rovira as president of the United Provinces, and colonel Mejía as vice-president.Mejía, however, had to assume the Presidency with the dictatorship powers bestowed to the president by Congress, because García Rovira was unable to assume the presidency at the moment.His presidency was short lived, he had only time to assemble a War Council in which it was decided to assemble a 600 manned army led by Mejía and head south and face the forces of Juan Sámano.