Brazil was once part of the United Kingdom of Portugal, Brazil and the Algarves.
Brazil . In 1815 , the colony was elevated to the rank of kingdom upon the formation of the United Kingdom of Portugal , Brazil and the Algarves . John VI ( Portuguese : João VI ; -- ) , nicknamed `` the Clement '' , was King of the United Kingdom of Portugal , Brazil and the Algarves from 1816 to 1822 .