He held various government positions until he became Minister of War during the government of Afonso Pena (1906-1909), from November 15, 1906 to May 27, 1908. During his term, at the suggestion of the Baron of Rio Branco, he also sent officers for training in the German Empire, who, after returning to Brazil, became known as the "Young Turks" . He also reformed the Army and Ministry with the creation of technical and administrative services. Of these innovations, the most important was the institution of compulsory military service, although this law was only legitimized with the Law No. 4,375 of August 17, 1964. Due to the discussion in the Chamber of Deputies about the participation of the military in the political life of the country, he resigned. He was later minister of the STM (Supreme Military Court).