The Treaty of Rio de Janeiro was an agreement signed in 1825 between Portugal and Brazil, officially recognizing Brazil's independence from Portugal, which had been declared in 1822. This treaty marked a significant turning point in the relationship between the two nations, as it established Brazil as a sovereign state and helped to solidify its position in the international community during a time of political change in South America.