Portuguese and Brazilian diplomats signed the Treaty of Rio de Janeiro, with Portugal formally recognizing Brazilian independence and ending three years of armed conflict. The agreement required Brazil to assume Portuguese debts and pay compensation, but it confirmed the largest nation in South America as a sovereign state and reshaped the balance of power across Latin America.