 The day after his arrival governor Francisco Candioti died, which gave Viamonte the opportunity to make the province depend again on Buenos Aires.The following year he was expelled in a rising organized by local caudillos Mariano Vera and Estanislao López, and he was sent to be imprisoned at Artigas encampment.In May 1818 he was a deputy to the Congress of Tucumán, and the following year he was named chief of the expeditionary army of Santa Fe, replacing Juan Ramón Balcarce.