 Unlike his predecessors , who were notable for their inertia , Caxias went on the offensive from the start . In July 1843 , Marques de Sousa attacked the rebel capital , <unk> , which had been all but abandoned by the Ragamuffins . He marched from there to Pelotas and recaptured the town he had lost in 1836 . On 2 December , he fought and won a small skirmish with rebels near the imperial army 's main encampment . He remained in the village of São Gabriel for most of 1844 , guarding it undisturbed . The Ragamuffins were by this time on the run , and they sued for peace . Caxias chose Marques de Sousa to take a Ragamuffin representative to discuss a peace accord with the central government ; they arrived in Rio de Janeiro on 12 December . The negotiations were successful and the war came to an end on 1 March 1845 . 
