[1][2][3] Leiva was a soldier and initially came to power through the support of the military.
In 1876 he left office due to pressure from Justo Rufino Barrios, the president of Guatemala.
[4] He later served as minister of war to Luis Bográn, and then was elected to the presidency in 1891.
In this election held on 10 November 1891 Leiva received the majority of the vote.
In 1893 Leiva resigned from office due to the threat of revolution and was replaced by Domingo Vasquez.