sentences:  Brazil was the only country in Latin America to gain its independence without bloodshed.The invasion of Portugal by Napoleon in 1808 had forced King João VI to escape to Brazil and establish his court in Rio de Janeiro.For thirteen years, Portugal was ruled from Brazil (the only instance of such a reversal of roles between colony and metropole) until his return to Portugal in 1821.