After the Revolution of 1868, Francisco Serrano y Dominguez, head of the Provisional Government, named him Ministro de Hacienda, a position he held until early the following year.
He was then elected President of the Board of Directors for the Institución Libre de Enseñanza, created by Royal Decree in 1876.