Of course, Portugal’s major rival for control of South America had always been Spain. Back in 1494, when both nations were the undisputed colonial powers of the world, the Treaty of Tordesilhas had preemptively sought to settle future territorial disputes by carving the New World into two large pieces. An imaginary line that stretched from the mouth of the Amazon River to the south of Santa Catarina  effectively sliced the South American continent in half.
Although according to the rules, everything west of the line belonged to Spain, and everything east belonged to Portugal, in reality, the imaginary frontier—much of which stretched through impenetrable rainforest of the Amazon  and Pantanal wetlands of Mato Grosso —was difficult to monitor.
Jesuit missionaries, who had tight connections with the Portuguese crown, were the first to work their way deep into the unknown Brazilian interior. The first missionaries arrived in Salvador  in 1549 and set to work building the second-largest Jesuit college after Rome. Intent on converting (and subjugating) the local Indian population, they headed west into the Amazon and south towards the Pampas bordering Brazil , Argentina , and Uruguay, and founded missions into which Indians were herded.
Throughout the 1600s, Jesuit influence in Brazil grew enormously. While some Jesuits exploited Indians, using them as unpaid labor, and exposed them to fatal diseases, others protected them from Portuguese settlers intent on enslaving the “savages.” The most famous of these humanitarian missionaries was Antônio Vieira, a former adviser to the king, who was based in São Luís . Vieira’s sermons preaching tolerance and criticizing inhumane treatment of Indians were so eloquent that they were published in Europe, and so controversial that they led furious settlers to expel him from Brazil in 1661.
Meanwhile, the Jesuits in Rio Grande do Sul  were so protective of the Guarani Indians that, in 1752, when the Treaty of Madrid divided up the region containing a dozen missions between Spanish and Portuguese settlers, the missionaries stood by the Guarani in refusing to leave. The noble resistance proved futile. Both Jesuits and Indians were massacred by Spanish and Portuguese troops. Moreover, the missionaries’ role was a major factor in the order’s definitive expulsion from Brazil in 1760.
The other people responsible for the exploration and opening up of Brazil ’s vast interior were the bandeirantes. Rough and ready bands of explorers in search of riches and Indians to enslave, bandeirantes took their name from the bandeiras (flags) that accompanied their roving expeditions. The first bandeirante expeditions began in the early 17th century. The main point of departure was São Paulo , due to its strategic location on the banks of the Rio Tietê, one of the few major rivers that flowed west into the interior.
Many bandeirantes were mestiços, the progeny of Portuguese fathers and Indian mothers. Their Indian heritage gave them knowledge of navigating the dangers of the wilderness, but didn’t stop them from unceremoniously wiping out any indigenous groups that happened to cross their path with arms and (more commonly) diseases. The distances covered by these ruthless but intrepid explorers were immense, and their discoveries filled in the contours of the Brazilian map. Many towns throughout the western regions of Goiás, Mato Grosso, and even the lower Amazon were founded by bandeirantes, whose expeditions often lasted for years.
Although in the early decades, the bandeirantes certainly found many Indians, the riches eluded them until the late 1600s. In 1695, a small group of bandeirantes happened upon some glittering nuggets in a river, at the spot that is now Sabará, in Minas Gerais. The find kicked off the biggest gold rush in the New World. Although deposits were found as far west as Goiás  and Mato Grosso , most of the glitter was concentrated in the central mountainous region that came to be known as Minas Gerais (General Mines).
During the boom years, which lasted 1700–1750, hundreds of thousands of fortune hunters descended upon the region. Many died poor, of hunger and disease; others grew filthy rich. Overnight, precarious miners’ outposts blossomed into towns such as Ouro Preto, Mariana, São João del Rei, and Tiradentes, where wealthy merchants poured their money into grandiose mansions, posh restaurants and hotels, and sumptuous baroque churches whose interiors were awash in gold leaf.
Vast numbers of slaves were imported (some directly from Africa, others from Bahia ) to work the mines, where conditions proved worse than in the sugarcane fields.
Naturally, Portugal (which was increasingly in debt) was thrilled with the discovery of gold. Built by slaves, roads constructed out of thick stone led through the mountains of Minas and down to the ports of Rio de Janeiro  and Paraty , from where the gold was shipped off to Lisbon. In fact, it was Rio’s newfound importance as a strategic maritime port that elevated the humid and filthy backwater town on the shores of Guanabara Bay to capital of Brazil (a title it usurped from Salvador  in 1763). The move signaled the beginning of the end of the northeastern Brazil’s economic and political supremacy in favor of the southeastern “triangle” formed by Minas Gerais, Rio de Janeiro, and São Paulo.