Returning to Buenos Aires he was given command of the brigantine "General Belgrano", as second in command to admiral Guillermo Brown, to fight against the naval forces of Pedro I of Brazil who had declared war on Argentina at the end of 1825.