A political revolution erupted in Portugal in 1820, forcing the royal family to return. John VI's heir, Pedro, Prince of Brazil, remained in Brazil. In 1821, the Portuguese Assembly demanded Brazil to return to its former condition of colony and the return of the heir prince to Portugal. Pedro, influenced by the Rio de Janeiro Senate (Senado da Câmara) refused to return on January 9, 1822, a date which became known as Dia do Fico (I'll Stay Day).

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".[2]