increasingly identified himself with the saquarema ideology: liberalism, preservation of the authority of the state, and support for representative parliamentary monarchy. Although his move toward the saquarema camp was not clear at the time he accepted the appointment to put down the rebellion in Maranhão in 1839, his victory over the Liberal rebels in 1842 further solidified his allegiance to the Party of Order. Ragamuffin War When the republican secessionist rebellion known as the Ragamuffin War began in Rio Grande do Sul in 1835, João Manuel de Lima e Silva, one of Caxias's 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. Caxias had made a short trip to Rio Grande do Sul in 1839 to inspect the troops fighting the Ragamuffins. Upon his return to the province in November 1842, he found that the rebels, severely weakened after years of struggle, had been forced to resort to guerrilla warfare. When threatened, the rebels escaped to safety in nearby Uruguay (formerly Cisplatina). As in Maranhão, São Paulo and Minas Gerais, Caxias planted spies within the enemy's ranks to gather information and to foment dissension. Historian Roderick J. Barman said that he "displayed military, organizational, and political talents essential to what is now termed 'counterinsurgency'." In early 1843, Honório Hermeto became the head of the cabinet, and so long as the saquaremas remained in power, Caxias was secure in his position. After Honório Hermeto quarreled with Pedro II a year later, he and the saquaremas resigned. The Liberals replaced the saquaremas in government, but Caxias was retained in his command. The War of the Ragamuffins took far longer to put down than had previous rebellions, but through careful negotiation and military victories, Caxias finally managed to pacify the province. The end of the armed conflict was declared on 1 March 1845.