 Since his arrival in Uruguaiana , Mitre had claimed the position of commander @-@ in @-@ chief of all allied forces participating in the siege — a precedence Porto Alegre vehemently refused to recognize . He reminded the Argentine president that , according to the Treaty of the Triple Alliance , the imperial army would be led by a Brazilian officer while on Brazilian soil . Porto Alegre later argued that " I would prefer to answer to a court @-@ martial rather than to subject myself , in our territory , to the command of a foreign general " . The dispute was temporarily forgotten when Pedro II arrived at the front . The Brazilian monarch settled the dispute when , at his suggestion , the allied army was divided into three forces , one led by Porto Alegre and the other two by Mitre and Flores . On 18 September , the Paraguayan garrison surrendered without further bloodshed . 
