Capitals of Brazil

The capital of Brazil is Brasília, a planned city that was built to be the capital of the country. Before that, Brazil had two other capital cities: Salvador (1549–1763)Mulhall, Michael et al. (1877). "Bahaia", Handbook of Brazil, pp. 115-141. and Rio de Janeiro (1763–1960).

Salvador
Salvador was established in 1549 by Thome da Sousa.  It became the capital of Brazil.

The city became the seat of the Catholic primate of Brazil.Mulhall, p. 118.

Rio de Janeiro
The Portuguese colonial administration moved south to Rio de Janeiro in 1763. Rio was the capital of the Viceroyalty of Brazil.Grant, Arthur Hastings et al. (1918).  "Rio de Janiero, the Fair Capital of Brazil," The American City, Vol. 18, pp. 208-213.

In 1807 the Portuguese royal family fled Lisbon when Napoleon I of France invaded Portugal. The Portuguese royal capital was temporarily moved from Europe to Rio de Janeiro.Curtis, William Eleroy. (1888).  The Capitals of Spanish America, pp. 687.

After the Brazil became an independent nation in 1822, Rio continued to be the capital of the Empire of Brazil.

When the Republic of Brazil was established in 1889, Rio was its capital also.

Brasilia
Brasília became the federal capital on April 21, 1960.Sennott, Stephen. (2004).  Encyclopedia of Twentieth Century Architecture p. 167.

References

Capital of Brazil