There were local conspiracies to secede from Portugal as early as in 1789 .
The Independence of Brazil took place in the 1820s , after the transfer of the Portuguese Court to Brazil during the Napoleonic Wars .
There were local conspiracies to secede from Portugal as early as in 1789 , but the Independence of Brazil took place in the 1820s , after the transfer of the Portuguese Court to Brazil during the Napoleonic Wars .