After a 49-year reign, Pedro II, the second and last emperor of Brazil, is deposed in a military coup. The Brazilian monarchy was established in 1822 when Portugal's crown prince, Dom Pedro, defied his Parliament and proclaimed an independent Brazil under his rule. The Brazilian empire got off to a rough start, however, and in 1831 Emperor Pedro I abdicated in favor of his five-year-old son and returned to Portugal. Pedro II was crowned emperor in 1841, and proved to be a much more capable leader than his father. During his five-decade reign, Brazil enjoyed unprecedented stability, as its troubled economy stabilized and began to grow. However, he later alienated certain sectors in society, such as the military and growing urban middle class. After being deposed, Pedro II went to Europe, where he died in exile two years later.