Rio was founded in 1565 by the Portuguese as a fortification against the French privateers who trafficked wood & goods from Brazil. Piracy played a major role in the city's history and there is still a colonial fortress to be visited.
The Portuguese fought the French
for nearly 10 years, both sides having rival native tribes as allies.
For the next two centuries it was an unimportant outpost of the
Portuguese Empire, until gold, diamonds and ore were found in Minas
Gerais in 1720.