With the Portuguese court sheltering in Rio from 1808, Brazil's standing rose; in 1822 the heir Pedro I proclaimed independence and founded the Brazilian Empire - unlike Spanish America's armed revolutions, a peaceful parting led by the royal house itself, sparing the land fragmentation. The empire's economy turned from sugar and gold to coffee; slavery grew ever more contested; Pedro II reigned near half a century (1840-1889), carrying the railways and the coffee economy into Brazilian hands. The Free Womb law (1871) and the Golden Law (1888) ended slavery step by step; planter and military discontent gathered, and in 1889 Fonseca's coup deposed the emperor and founded the republic (the Old Republic) - the Sao Paulo coffee oligarchs and the army alternately leading, the federal republic running to this day (band drawn to the canvas end at 1912).
Editorial note on dating Pedro I's Brazilian Empire from 1822; a republic by coup in 1889; ongoing, band drawn to the canvas end.