Mansilla refused to join the coup of Juan Lavalle against the governor Manuel Dorrego in 1828. Lavalle was ousted from power some time later, and Juan José Viamonte appointed him head of the police of Buenos Aires, once the Federals returned to power. He joined the military again with the War of the Confederation, and moved to Tucumán. He did not take action during the campaign of Lavalle against Juan Manuel de Rosas during the French blockade of the Río de la Plata, because Rosas was his brother-in-law (Mansilla married the sister of Rosas, Marina Agustina Dominga del Corazón de Jesús Ortiz de Rozas y López de Osornio on April 2, 1831) and Lavalle his comrade in arms during the War of Brazil.