The Empire of Brazil had an origin unlike almost any other nation in the Western Hemisphere. While the rest of the Americas threw off European rule through prolonged wars of independence, Brazil's path to sovereignty was charted by a member of the very royal dynasty that had colonized it. When Napoleon's armies swept into Portugal in 1807, the Portuguese court fled rather than surrender. Prince Regent João, accompanied by several thousand courtiers, nobles, and administrators, boarded a fleet of ships under British naval escort and crossed the Atlantic to establish his government in Rio de Janeiro. Brazil ceased to be a colony administered from Lisbon and became, effectively, the seat of the Portuguese Empire. João raised it to the status of a kingdom equal to Portugal in 1815, a transformation that made a simple return to colonial subordination politically impossible.
João returned to Portugal in 1821 to manage a constitutional crisis, leaving behind his eldest son and heir, Pedro, as regent of the Kingdom of Brazil. The Portuguese Cortes, eager to reassert colonial control, ordered Pedro to return as well. He refused. On 7 September 1822, beside the Ipiranga River in São Paulo, he made the break explicit, declaring the independence of Brazil. The war that followed was brief by the standards of the era. Portuguese garrisons throughout Brazil were expelled. On 12 October 1822, Pedro was acclaimed Emperor Pedro I of Brazil, the first monarch of the new nation.
The empire he inherited was immense, sparsely populated, and ethnically diverse beyond any other country on earth. It extended from the Amazon basin to the temperate grasslands of the south, encompassing tropical rainforest, cerrado plateau, semi-arid scrubland, and coastal marsh. Unlike the former Spanish colonies that fragmented into a dozen republics, Brazil held together as a single political unit, a cohesion that owed much to the shared institution of the monarchy and the presence of a centralized court that could mediate regional conflicts.
Pedro I's reign was contentious from the start. His first constitution, imposed in 1824, created a bicameral parliament elected under comparatively democratic standards for the period, but also reserved enormous powers for the emperor through a "moderating power" that allowed him to dismiss governments and dissolve the legislature at will. A persistent conflict with parliamentary factions over the proper limits of royal authority ran through his entire reign. Abroad, his first major challenge was a war with the United Provinces of the Río de la Plata over the Cisplatine Province, what is now Uruguay. The unsuccessful Cisplatine War of 1825 to 1828 ended with the secession of that territory as an independent state — a diplomatic and military embarrassment that weakened Pedro's standing at home.
In 1826, he inherited the Portuguese throne upon the death of his father João VI, becoming king of both Brazil and Portugal simultaneously, a situation that alarmed Brazilians who feared recolonization. He abdicated the Portuguese crown in favor of his eldest daughter Maria, but when Maria's position was usurped by Pedro's younger brother Miguel in 1828, the European crisis claimed his attention increasingly. Unable to manage both thrones, Pedro I abdicated the Brazilian throne on 7 April 1831 and sailed immediately for Europe to restore his daughter to power.
His successor in Brazil was his five-year-old son, who would reign as Pedro II. A regency was established to govern until the boy came of age, and the decade of regency rule was the most turbulent period in the empire's history. Without a reigning monarch to serve as political arbiter, regional separatist movements multiplied into armed revolts. The Cabanagem in the Amazon, the Balaiada in Maranhão, the Farroupilha in Rio Grande do Sul, and the Sabinada in Bahia all threatened the territorial integrity of the empire. The regents struggled to contain them.
Pedro II was declared of age and assumed full imperial powers in 1841, at fourteen, two years before the legal majority. His reign would last nearly half a century, until 1889, and would prove far more stable and consequential than his father's. He fought and won three major international conflicts: the Platine War against the Argentine Confederation in the late 1840s, the Uruguayan War in 1864, and most significantly the devastating Paraguayan War from 1864 to 1870, which left Paraguay decimated but also drained Brazil of blood and treasure on a massive scale. He expanded infrastructure, promoted immigration from Europe, and presided over a flowering of Brazilian arts, literature, and science.
Slavery, which had been fundamental to the empire's agricultural economy, was progressively restricted through a series of legislative measures. The trade in enslaved people from Africa was suppressed in 1850. The 1871 Law of the Free Womb declared that children of enslaved women would be born free. Full abolition came on 13 May 1888, when the Golden Law was signed by Pedro's daughter Princess Isabel, acting as regent during his absence. The abolition was economically and politically momentous: it alienated the planter class, which had been one of the monarchy's core constituencies, and helped accelerate the republican movement.
Pedro II himself seemed to regard the monarchy's demise with something approaching indifference. He was an intellectual and a patron of science who had corresponded with Darwin, Graham Bell, and Pasteur, but he had no desire to stage a political struggle to perpetuate a dynasty. His heir was his daughter Isabel, but neither he nor the Brazilian ruling classes were willing to accept a female monarch. With no viable successor and a planter class now hostile to the throne, the political logic of the empire disintegrated. On 15 November 1889, a military revolt declared a republic. Pedro II departed for Europe in exile and died in Paris in 1891. The empire he had inherited in chaos had lasted sixty-seven years, and its boundaries, its institutions, and its singular cohesion had made modern Brazil possible.

