After two defeats against the Spanish royalist troops in Peru at Venta y Media and Sipe-Sipe, he was relieved from his command in 1816.
Po dvoch porážkach od španielskych kráľovských vojsk v Peru, v bitkách pri Venta y Media a Sipe-Sipe bol v roku 1816 zbavený velenia a vrátil sa do Buenos Aires.