vote. He also defended the increase of municipal autonomy, increasingly aligning himself with political and economic liberalism, for which he also supported the non intervention of the State in the economy. In 1882, he began his experience in executive positions, being appointed Minister of War in the cabinet of prime minister Martinho Campos at the age of 35; Pena was one of only two civilians to hold the office, the other being . Despite this, he was well received by the military, as he defended their freedom of speech and military reforms, which included the Army's professionalization. In the following years, he was Minister of Agriculture, Commerce and Public Works in the cabinet of Lafayette Rodrigues (1883 to 1884), and Interior and Justice in the cabinet of José Antônio Saraiva (1885). As Minister of Justice, Pena entirely reformed the police and improved the prison system; in this office he was also one of signatories of the , which granted freedom to slaves aged 60 and over. However, he reinforced the capture of fugitive slaves and prosecuted the abolitionists who helped them. Pena's stance on slavery became ambiguous. He did not own slaves, although this is not certain. However, his political prominence made him abandon his youth abolitionist ideal, as he became increasingly concerned with the economic impacts of abolition and sought to be loyal to his party. Pena accompanied the party in congressional debates regarding slavery; Minas Gerais' congressmen feared abolition could harm the province's economy, which largely relied on coffee. In any case, he later voted in favor of the Golden Law, which finally abolished slavery in Brazil in 1888, but expressed his concerns regarding the effects the law would have. In 1888, due to his proximity to Afonso Celso, he was appointed a member of the . Despite criticizing nominations based on political affinity, even committing himself to fighting them, Pena could not detach himself from it, as not to harm his political career. That same year, as state councilor, Pena became member of a commission tasked with drafting Brazil's first Civil Code, as the country lacked one. However, the works were interrupted with the coup d'état that abolished the monarchy and proclaimed the republic in Brazil on 15 November 1889. After the republic was proclaimed, Pena returned to Barbacena, saddened by the banishment of emperor Pedro II. He thought about abandoning politics to resume his law career.