Pedro's declaration of independence from Portugal, which is acclaimed by Brazilian nationalists as the birth of their country, was an act of defiance against his father, Portuguese King Joao VI.
The Portuguese king's family was escorted to safety in Brazil by the British Navy in 1807 before Napoleon's forces invaded Portugal. On returning to Lisbon in 1821, he left his son Pedro as prince regent of Brazil.