One day, in 1808, France invaded Portugal and the Royal Family had to flee to Brazil. In 1815, Brazil ceased to be just a colony, despite still being under the domination of Portugal, when Dom João VI created the United Kingdom of Portugal, Brazil and Algarves. Those were some steps towards independence.