Angered with the passivity of Buenos Aires during the Luso-Brazilian invasion of the Banda Oriental, Francisco Ramírez from Entre Ríos and Estanislao López from Santa Fe joined forces against the city. Saavedra fled to Montevideo, fearing that Buenos Aires would be obliterated if defeated. Ramírez and López won the battle of Cepeda, but the city was not destroyed, so Saavedra returned. He retired in 1822, and lived with his family in the countryside. He offered his services at the beginning of the War of Brazil, despite being 65 years old, but Balcarce declined the offer. He wrote his memoirs, "Memoria autógrafa", in 1828.