The flight of the court
In November 1807, as Napoleon's army under General Junot marched on Lisbon, the Portuguese royal family boarded ships in the Tagus and sailed for Brazil under British naval escort. Prince Regent João, ruling for his mother, Queen Maria I, who was mentally ill, took with him thousands of courtiers, officials and servants, along with the treasury, state archives and a royal library. Stopping first in Salvador, João signed in January 1808 a decree opening Brazil's ports to friendly nations, ending Portugal's monopoly on colonial trade. In practice that meant Britain, which in 1810 won a treaty giving its goods lower tariffs than Portugal's own.
A colony becomes a capital
Rio de Janeiro was transformed. The court created a Bank of Brazil, military and medical schools, a botanical garden and a royal printing press, the Impressão Régia, for until 1808 the Crown had banned printing presses in the colony. Courtiers seized the best houses, marking doors with the letters P.R., for Príncipe Regente, which local wits read as an order to get out into the street. In 1815 João raised Brazil to a kingdom equal in rank to Portugal within a United Kingdom of Portugal, Brazil and the Algarves, and he became king the next year when his mother died. Not everyone welcomed Rio's new power. In 1817 a republican revolt in Pernambuco, angered by taxes sent to the court, held out for over two months before it was crushed.
Independence
In 1820 a liberal revolution in Porto demanded a constitution and the king's return. João sailed for Lisbon in 1821, leaving his son Pedro as regent. The new Cortes, the Portuguese parliament, began moving to restore Lisbon's authority over Brazil and ordered Pedro home. Brazilian elites, fearing a return to colonial status, urged him to stay. On 9 January 1822 he announced that he would remain, a day remembered as the Fico, from the Portuguese for I am staying. His chief adviser was José Bonifácio de Andrada e Silva, a scientist trained at Coimbra who had spent decades in Europe and became known as the Patriarch of Independence. On 7 September 1822, near the Ipiranga stream outside São Paulo, Pedro received fresh orders from Lisbon and declared Brazil independent. He was crowned emperor that December.
Independence was not bloodless. Portuguese garrisons held out in Bahia, Maranhão, Pará and the far south. In Bahia, local militias, with Indigenous and Black fighters and a woman soldier, Maria Quitéria, who had enlisted disguised as a man, besieged Salvador until the Portuguese troops left on 2 July 1823, still celebrated as Bahia's independence day. Portugal recognized independence in 1825, in a treaty brokered by Britain, in which Brazil agreed to pay Portugal two million pounds.
Pedro's constitution
Pedro had promised a constitution, but when the elected constituent assembly tried to limit his powers he closed it with troops in November 1823. He then granted his own Constitution of 1824, which lasted until 1889, longer than any other in Brazil's history. Besides the legislative, executive and judicial powers, it created a fourth power held by the emperor alone, the moderating power, drawing on the French writer Benjamin Constant's idea of a neutral royal authority above parties. It let the emperor choose senators for life from lists of candidates, dissolve the chamber of deputies and name ministers. Voting depended on income, and Catholicism remained the state religion. Pernambuco rebelled again in 1824 in the Confederation of the Equator, and its leading voice, the friar Frei Caneca, was executed. A costly war over the southern province of Cisplatina ended in 1828 with the province's independence as Uruguay. Unpopular and drawn into Portugal's own succession struggle, Pedro I abdicated on 7 April 1831 in favor of his five-year-old son and sailed for Europe.
Worked example: why Brazil did not break apart
Spanish America split into many republics; Portuguese America became one empire. Why? Consider four explanations historians have offered. First, the court: from 1808 Rio had a legitimate king, so independence could come from a prince rather than against one, and loyalty could pass smoothly to a Brazilian monarchy. Second, fear: with enslaved people forming a large share of the population and the Haitian Revolution in recent memory, elites in every province had reason to avoid a long war that might arm the enslaved. Third, the elite itself: the historian José Murilo de Carvalho argued that Brazil's leaders were unusually alike, many trained in law at Coimbra and later in a few Brazilian schools, and shared a common outlook. Fourth, slavery and the slave trade tied provincial planters to Rio's merchants and to a strong central state that could protect their property. Now weigh the counterevidence. Unity was not assured: Pernambuco rebelled in 1817 and 1824, and in the 1830s several provinces rose in revolt, one of them for ten years. The explanations do not cancel each other. Together they suggest that unity was a choice powerful people made to protect an order, slavery included, that they feared to lose.
