Loayza was instrumental in the success of the La Paz revolution, on 16 July 1809 when group of revolutionaries led by Colonel Pedro Domingo Murillo and other individuals besieged the city barracks and forced the governor, Tadeo Davila and the Bishop of La Paz, Remigio de la Santa y Ortega, to resign.