In 1854 Carrera was declared "supreme and perpetual leader of the nation" for life, with the power to choose his successor. He held that position until he died on 14 April 1865. While he pursued some measures to set up a foundation for economic prosperity to please the conservative landowners, military challenges at home and a three-year war with Honduras, El Salvador, and Nicaragua dominated his presidency.