He was Minister of Interior of Spain during the regency of Maria Christina of Austria and mayor of Madrid on several occasions between 1901 and 1910.
He was originally a member of the Liberal Party and was chosen deputy in Congress by the district of Granada Province in the successive elections celebrated between 1886 and 1903.
He was Spain's Minister of the Interior between March 12 and November 4, 1894, in a government presided over by Práxedes Mateo Sagasta.
As mayor of the capital of Spain he was involved in numerous important events and left an impression.
Soon after becoming mayor, he organised the inauguration of the throne of Alfonso XIII of Spain, carried out on June 5, 1902.