By the end of the 17th century, sugarcane exports began to decline,[64] and the discovery of gold by bandeirantes in the 1690s would become the new backbone of the colony’s economy, fostering a Brazilian Gold Rush[65] which attracted thousands of new settlers to Brazil from Portugal and all Portuguese colonies around the world.[66] This increased level of immigration in turn caused some conflicts between newcomers and old settlers.[67]
Portuguese expeditions known as Bandeiras gradually advanced the Portugal colonial original frontiers in South America to approximately the current Brazilian borders.[68][69] In this era other European powers tried to colonize parts of Brazil, in incursions that the Portuguese had to fight, notably the French in Rio during the 1560s, in Maranhão during the 1610s, and the Dutch in Bahia and Pernambuco, during the Dutch–Portuguese War, after the end of Iberian Union.[70]
The Portuguese colonial administration in Brazil had two objectives that would ensure colonial order and the monopoly of Portugal’s wealthiest and largest colony: to keep under control and eradicate all forms of slave rebellion and resistance, such as the Quilombo of Palmares,[71] and to repress all movements for autonomy or independence, such as the Minas Conspiracy
