quality:corruption, structural:reformatting, stylistic:style_transfer, information:filtering
War and widowhood

Backed by the United Provinces of the Río de la Plata (present-day Argentina), a small band declared Brazil's southernmost province of Cisplatina to be independent in April 1825. The Brazilian government at first perceived the secession attempt as a minor uprising. It took months before a greater threat posed by the involvement of the United Provinces, which expected to annex Cisplatina, caused serious concern. In retaliation, the Empire declared war in December, triggering the Cisplatine War. The Emperor traveled to Bahia province (located in northeastern Brazil) in February 1826, taking along his wife and daughter Maria. The Emperor was warmly welcomed by the inhabitants of Bahia. The trip was planned to generate support for the war-effort.

The imperial entourage included Domitila de Castro (then-Viscountess and later Marchioness of Santos), who had been Pedro I's mistress since their first meeting in 1822. Although he had never been faithful to Maria Leopoldina, he had previously been careful to conceal his sexual escapades with other women. However, his infatuation for his new lover "had become both blatant and limitless", while his wife endured slights and became the object of gossip. Pedro I was increasingly rude and mean toward Maria Leopoldina, left her short of funds, prohibited her from leaving the palace and forced her to endure Domitila's presence as her lady-in-waiting. In the meantime, his lover took advantage by advancing her interests, as well as those of her family and friends. Those seeking favors or to promote projects increasingly sought her help, bypassing the normal, legal channels.

On 24 November 1826, Pedro I sailed from Rio de Janeiro to São José in the province of Santa Catarina. From there he rode to Porto Alegre, capital of the province of Rio Grande do Sul, where the main army was stationed. Upon his arrival on 7 December, the Emperor found the military conditions to be much worse than previous reports had led him to expect. He "reacted with his customary energy: he passed a flurry of orders, fired reputed grafters and incompetents, fraternized with the troops, and generally shook up military and civilian administration." He was already on his way back to Rio de Janeiro when he was told that Maria Leopoldina had died following a miscarriage. Unfounded rumors soon spread that purported that she had died after being physically assaulted by Pedro I. Meanwhile, the war continued on with no conclusion in sight. Pedro I relinquished Cisplatina in August 1828, and the province became the independent nation of Uruguay.