When Napoleon's forces invaded Portugal, the king of Portugal, John VI, fled (1807) to Brazil, and on his arrival (1808) in Rio de Janeiro that city became the capital of the Portuguese Empire. The ports of the colony were freed of mercantilist restrictions, and Brazil became a kingdom, of equal status with Portugal. In 1821 the king returned to Portugal, leaving his son behind as regent of Brazil. New policies by Portugal toward Brazil, tightening colonial restrictions, stirred up wide unrest."

