Guerra del Brasil
He personally ruled the newly conquered Cisplatina Province, until the Cisplatine War of 1825–1828. During this war, he succeeded in defending Montevideo against an Argentine-Uruguayan siege, but when Uruguay became independent in the peace treaty, he had to return to Brazil.