"Soon after, Elías ended his government upon the triumph of Castilla over Vivanco.Elías occupied various public posts such as minister, deputy of Ica (1845) and even a candidate for the Presidency of Peru in the controversial elections of 1851, when he was defeated by Echenique.