He started his political life in the Reformist Party and was a deputy in the Cortes from 1880 to 1904. However he maintained a certain distance from party-politics. He also served as Minister of Justice (29 February 1886 – 14 January 1890) and of Foreign Affairs (1898). He was the author of the regulating code for the creation and functioning of commercial societies in Portugal (1888).
On 22 December 1909 he was named President of the Ministry (Prime Minister) by young king Manuel II of Portugal. However, his government did not last long as it was followed by a political scandal related to the Crédito Predial Bank that implicated several of his ministers. He resigned on 26 June 1910. He was followed by António Teixeira de Sousa, the last Prime Minister of the constitutional monarchy.
After the proclamation of the Portuguese Republic on 5 October 1910 he abandoned political life and continued working as a lawyer and attorney.