When the republican secessionist rebellion known as the Ragamuffin War began in Rio Grande do Sul in 1835, one of Caxias' uncles joined the rebels. His father, Francisco de Lima, and possibly another uncle (the Minister of War at the time), also secretly supported the rebellion. On 28 September 1842, Caxias was appointed president and military commander of the province of Rio Grande do Sul. The 16-year-old Pedro II allowed Caxias to prove once more that he was unlike his father and uncles and gave him a short and direct order: "End this revolution, as you have ended the others." Caxias brought with him a fellow "saquarema" and a famous poet, Domingos Gonçalves de Magalhães (later Viscount of Araguaia), to serve as his secretary, as he had previously in Maranhão.