Brazil was a Portuguese colony between 1500 and 1815, when it was elevated to a kingdom following the transfer of the Portuguese Court to its largest colony during the Napoleonic invasions of Portugal. In 1822, after the royal family returned to Portugal, Brazil finally became independent, but oddly enough its biggest national hero was Dom Pedro, the son of the Portuguese king himself, who was left behind to govern the country as prince regent.