José María Montealegre

José María Montealegre Fernández (19 March 1815 – September 26, 1887) was President of Costa Rica from 1859 to 1863.

Born into a wealthy family of coffee plantation owners, he was sent to study medicine in Aberdeen, where he graduated as a surgeon. Montealegre was the first Costa Rican to be sent to study medicine in Europe. He married twice: in 1840 to Ana Maria Mora (1819–1854), sister of the previous President Juan Rafael Mora (1849–1859), and in 1858 to Sofía Matilde Joy Redman (1823–1908), a Londoner, who was a relative of British diplomat Sir William Gore Ouseley.

He came to power following a military coup d'état against Juan Rafael Mora. In the first months of his presidency he convened a constitutional conventional, which produced the Constitution of 1859.

Under the new constitution he was popularly elected to a three-year presidential term in 1860, after which he handed on the presidency, peacefully and democratically, to Jesús Jiménez.

He suffered a political setback when a coup led by Tomás Guardia Gutiérrez deposed his brother-in-law, Bruno Carranza. Montealegre decided to leave Costa Rica, and sailed with his family on the steamer Alaska to San Francisco in 1872. He died in San Jose, California and his mortal remains laid near Mission San Jose (located in what is now Fremont, California) until they were repatriated in 1978.

His sister was Gerónima Montealegre, and his great-great-grandniece is actress Madeleine Stowe.