During which war was Brazil last invaded ?
In 1815 , the Portuguese crown prince Dom João ( later Dom João VI ) , acting as regent , created the United Kingdom of Portugal , Brazil and the Algarves , which raised the status of Brazil from colony to kingdom .