The allies invaded Paraguay in April 1866, but after initial success, their advance was blocked by fortifications at Humaitá and along the Paraguay River. Porto Alegre had remained behind, leading the 2nd Corps and guarding Rio Grande do Sul. Mitre, no longer on Brazilian territory and acknowledged as the allied commander-in-chief, planned to use Porto Alegre's army to march through Paraguayan territory from the rear to surround Humaitá. As a result of a suggestion by Tamandaré—though Mitre had not issued orders for the move—Porto Alegre boarded his army onto Brazilian ships and instead brought them up to the positions occupied by the other allied troops.
