The victorious Emperor punished the patriots with ruthless severity, sending many of the leaders to the scaffold, and establishing military tribunals which inaugurated a reign of terror. An Englishman named Ratcliff was brought to Rio and hanged, not so much for his part in the insurrection as because he had once offended Pedro's mother in Portugal. "She offered a reward for his head," said the Emperor as he signed the death-warrant, "but now she shall have it for nothing." In the spring of 1825 it seemed as if Pedro was certain to establish himself at the head of a military despotism extending from the Amazon to the Plate. Before the Pernambuco insurrection his revenue and recruits had been drawn solely from Rio and the adjacent provinces. Now his fleet and disciplined army, recruited by impressment and concentrated under his eye, enabled him to get revenue from all the ports and to hold the provinces in check. His sea-power and his possession of the purse-strings gave him a tremendous advantage. He imported Germans, Swiss, and Irish with a view to forming a corps of janizaries. All Brazil seemed submissive, and the enthusiasm which had flamed out among the Brazilians in 1821 and 1822 had died down, leaving as its only permanent effect a strong sentiment against reunion with Portugal.
Externally his position seemed secure. He was assured of Canning's active support in securing formal recognition as an independent monarch; Portugal was helpless; though his application for a defensive and offensive alliance had been refused by Henry Clay, the United States was the first to recognise Brazil's independence; even the Holy Alliance had little objection to an independent American state ruled by a legitimate monarch. In the summer of 1825 a treaty of peace was framed between Portugal and Brazil through the intermediation of England. Independence was formally recognised, but Pedro made the error of consenting that his father should take the honorary title of Emperor of Brazil, and by a secret article he pledged Brazil to assume ten millions of the Portuguese debt, though it had been incurred in war against herself.
In March, 1825, a rebellion against Pedro broke out in Uruguay, and the Argentine gauchos swarmed over the border. The Brazilians easily held the fortified city of Montevideo, but the Spanish-Americans were successful in the open field, and after six months of harassing fighting caught the imperial army in a disadvantageous position and cut it to pieces in the decisive battle of Sarandy. The Buenos Aires government at once gave notice that it must recognise that Uruguay had reunited itself to the Argentine, and Pedro responded with a declaration of war and a blockade.
The preparations for war involved him in unprecedented expenditures, which piled up the debt already accumulated in his father's time and added to by the war of independence and the suppression of the "Confederation of the Equator." He decided to call together the representatives of the people and insist that they bear a share of the responsibility. So little interest was taken that it was hard to hold the elections, and the members had to be urged to present themselves. On the 3rd of May, 1826, the first Brazilian Congress met. Intended as a mere instrument to furnish supplies for the war, and meeting with the fear of the fate of the constituent assembly before its eyes, it hesitatingly began the work of parliamentary government. Except for the revolution of 1889, the sessions have never since been interrupted.
A week before the assembling of Congress the news reached Brazil that King John was dead. Pedro was the eldest son, but his brother Miguel was a candidate for the vacant throne. Pedro had to make an immediate choice between the two crowns. He decided to keep that of Brazil and to transfer that of Portugal to his daughter, Maria Gloria, then a child seven years old. He tried to head off Miguel by making the latter regent and promising that Maria should marry him as soon as she was old enough, while he tied his brother's hands by promulgating a constitution for Portugal. The scheme failed to preserve the peace, and the Portuguese absolutists, supporting Miguel, and the constitutionalists, Maria Gloria, almost immediately became involved in a civil war. During the latter part of Pedro's reign he was continually preoccupied with Portuguese affairs and trying to promote his daughter's fortunes in Europe.
The war on the Plate turned out difficult and disastrous. Notwithstanding that great land forces were sent, no progress was made toward reducing Uruguay to obedience, and the overwhelming naval force blockading Buenos Aires was harassed by a small fleet improvised by an able Irishman—Admiral Brown—in the Argentine service. Fast-sailing Baltimore clippers fitted out as privateers infested the whole Brazilian coast, often venturing in sight of Rio and soon sweeping the coasting trade out of existence. Fruitless attempts to enforce the blockade involved Pedro in difficulties with neutral powers; Brazilian merchants were disgusted with the war, and communication between the provinces became nearly impossible.
The Brazilian land forces in Uruguay were increased to twenty thousand, but the Argentines under General Carlos Alvear audaciously averted the danger of an invasion of their territory by planning and effecting an inroad into Rio Grande itself. The Brazilian general allowed Alvear to slip between his main body and Montevideo, and the latter penetrated to the East, sacked the important town of Bagé, and was off to the North with the whole Brazilian army in hot pursuit. On the 20th of February, 1827, the Argentines turned and attacked the Brazilians at a disadvantage, defeating them with great loss. In this battle of Ituzaingo sixteen thousand men took part, and the armies were nearly equal in numbers. The Brazilians escaped without serious pursuit, while the Argentines retired at their leisure, assured that no aggressive operations would soon be undertaken against them. Pedro's hope of dominance on the south shore of the Plate was ended. Naval disasters suffered at the hands of the indefatigable Brown made him still more anxious for peace. Negotiations were begun with the Argentine government which was only prevented by lack of money and internal factional quarrels from undertaking an aggressive war against Brazilian territory. Operations were kept up languidly on both sides for a year, and finally Pedro in 1828 consented to a preliminary treaty by which he relinquished his sovereignty over Uruguay, obtaining in return Argentine consent that it be erected into an independent country.
The first session of the Brazilian Congress had been very timid and voted as the Emperor desired. The session of 1827 was not so respectful; the news of Ituzaingo had made him seem less formidable. For the first time the chamber became a forum for the discussion of governmental theories, and the voice of Vasconcellos, the great champion of parliamentary government, was heard. In the fall of 1827 independent newspapers began to make their appearance and Pedro dared not interfere with them. The tone of most of them was exaggerated, but in December the Aurora Fluminense, with Evaristo da Veiga as editor, issued its first number. By universal consent he is recognised as the most influential journalist who ever wielded a pen in Brazil. His profound and temperate discussions of public affairs gave him an ascendency over opinion which can hardly be understood in countries where party conventions and set speeches give opportunities for authoritatively outlining policies.