Legend has it that a servant in an early expedition exploring Brazil’s interior pocketed a few grains of an odd black metal he found while drinking from a river near the current site of Ouro Preto. It turned out to be gold, and the local deposits were soon discovered to be the largest in the New World.

Gold fever spread fast. In 1711, Vila Rica de Ouro Preto was founded, and in 1721 it became the capital of Minas Gerais. Gold bought the services of baroque artisans, who turned the city into an architectural gem. At the height of the gold boom in the mid-18th century, there were 110,000 people (mainly slaves) in Ouro Preto, compared with 50,000 in New York and about 20,000 in Rio de Janeiro.

In theory, all gold was brought to casas de intendéncias (weighing stations), and a quinto do ouro (royal fifth) was set aside for the Portuguese crown. The greed of the Portuguese led to sedition, as the miners found it increasingly difficult to pay ever-larger gold taxes. In 1789, poets Claudio da Costa, Tomás Antônio Gonzaga, Joaquim José da Silva Xavier (nicknamed Tiradentes, meaning ‘Tooth Puller,’ for his dentistry skills) and others, full of French Revolutionary philosophies, hatched an uprising against Portuguese colonization known as the Inconfidência Mineira.

The rebellion was crushed in its early stages by agents of the crown. Gonzaga was exiled to Mozambique and Costa did time in prison. Tiradentes was jailed for three years, then drawn and quartered in Rio de Janeiro. His head was paraded around Ouro Preto, his house demolished and its grounds salted to ensure that nothing would grow there.

In 1897 the state capital was shifted from Ouro Preto to Belo Horizonte, decisively preserving the city’s colonial flavor. In 1980, Ouro Preto was enshrined as Brazil’s first Unesco World Heritage Site.