In this environment, the Viscount of Ouro Preto decided to create an institution to act as a regulatory agency for the financial market, a "private" central bank in the European manner, a reserve bank, a monetary authority of liquidity. The fact that Rui Barbosa had been a great opponent of such system, accredited him to be appointed by the military as finance secretary, when they imposed the republic. When he took office, soon after the proclamation of the Republic, he put into practice all what he had criticized before. In January 1890 he enacted a new banking law inspired by the ideas of counselor Mayrinck, his banker and personal friend, who he without consulting the president appointed as head of the new Central Bank, signing the bill late at night in a scandal that would be the first of a series until his departure from the secretary.