
In 1808, French troops commanded by Emperor Napoleon Bonaparte invaded Portugal as a retaliation for the Iberian country's refusal to participate in the trade embargo against the United Kingdom. Fleeing persecution, the Portuguese monarchs transferred the Portuguese Court from Lisbon to Rio de Janeiro, then capital of Colonial Brazil. In 1815, Prince Regent John VI created the United Kingdom of Portugal, Brazil and the Algarves, elevating Brazil to the rank of kingdom and increasing its administrative independence

On September 2, 1822, a new decree with Lisbon's demands arrived in Rio de Janeiro, while Prince Pedro was in São Paulo. Princess Maria Leopoldina, acting as Princess Regent, met with the Council of Ministers and decided to send her husband a letter advising him to proclaim Brazil's independence. The letter reached Prince Pedro on September 7, 1822. That same day, in a famous scene at the shore of the Ipiranga River, he declared the country's independence, ending 322 years of colonial dominance of Portugal over Brazil.[1] According to journalist Laurentino Gomes, who wrote a book about the event, Prince Pedro "could not wait for his arrival to São Paulo to announce the decision".[2] Gomes adds that "he was a reckless man in his decisions but he had the profile of leader that Brazil needed at the time, because there was no time to think".[