Before 1889, Brazil was the Empire of Brazil, a constitutional monarchy ruled by Emperor Pedro II.
It was an independent country, but with a monarchical system of government, rather than a republic.
The Empire of Brazil existed from 1822 to 1889, and it was the largest and most populous country in both South America and the Latin American region.
The switch to a republic in 1889 marked a significant change in Brazil's political system, but it did not result in the creation of a new country.