Also known as "Dom Pedro I", after his abdication in 1831 for political incompatibilities (displeased, both by the landed elites, who thought him too liberal and by the intellectuals, who felt he was not liberal enough), he left for Portugal leaving behind his five-year-old son as Emperor Pedro II, which left the country ruled by regents between 1831 and 1840. This period was beset by rebellions of various motivations, such as the Sabinada, the Ragamuffin War, the Malê Revolt, Cabanagem and Balaiada, among others. After this period, Pedro II was declared of age and assumed his full prerogatives. Pedro II started a more-or-less parliamentary reign which lasted until 1889, when he was ousted by a "coup d'état" which instituted the republic in Brazil.