Origins:
Most native tribes who live and lived within Brazil's current borders are thought to descend from the first wave of migrants from North Asia (Siberia) that crossed the Bering Land Bridge at the end of the last Ice AgeAmerindians divided in 2,000 nations and tribes. around 9000 BC. In 1500 AD, the territory of modern Brazil had an estimated total population of nearly 3 million
A not-updated linguistic survey found 188 living indigenous languages with 155,000 total speakers. In 2007, Fundação Nacional do Índio (English: National Indian Foundation) reported the presence of 67 different tribes yet living without contact with civilization, up from 40 in 2005. With this figure, now Brazil has the largest number of uncontacted peoples in the World, even more than the island of New Guinea. When the Portuguese arrived in 1500, the Amerindians were mostly semi-nomadic tribes, with the largest population living on the coast and along the banks of major rivers. Unlike Christopher Columbus who thought he had reached the India, the Portuguese Vasco da Gama had already reached India sailing around Africa two years before they reached Brazil.
Nevertheless, the word índios ("Indians") was by then established to designate the peoples of the New World and stuck being used today in the Portuguese language, while the people of India are called indianos. Initially, the Europeans saw the natives as noble savages, and miscegenation of the population began right away. Tribal warfare and cannibalism convinced the Portuguese that they should "civilize" the Amerindians.

Colonization:
Initially Portugal had little interest in Brazil, mainly because of high profits gained through commerce with India, Indochina, China and Japan. Brazil's only economical exploitation was the pursuit of brazilwood for its treasured red dye. After 1530, the Portuguese Crown devised the Hereditary Captaincies system to effectively occupy its new colony, and later took direct control of the failed captaincies. Although temporary trading posts were established earlier to collect brazilwood, used as a dye, with permanent settlement came the establishment of the sugarcane industry and its intensive labor. Several early settlements were founded across the coast, among them the colonial capital, Salvador, established in 1549 at the Bay of All Saints in the north, and the city of Rio de Janeiro on March 1567, in the south. The Portuguese colonists adopted an economy based on the production of agricultural goods that were exported to Europe. Sugar became by far the most important Brazilian colonial product until the early 18th century. Even though Brazilian sugar was reputed as being of high quality, the industry faced a crisis during the 17th and 18th centuries when the Dutch and the French started producing sugar in the Antilles, located much closer to Europe, causing sugar prices to fall.
During the 17th century, private explorers from São Paulo Captaincy, nowadays called Bandeirantes, explored and expanded Brazilian borders mainly while raiding the hinterlands tribes aiming to enslave Native Brazilians. In the 18th century, the Bandeirantes found gold and diamond deposits in the modern-day state of Minas Gerais. The exploration of these mines were mostly used to finance the Portuguese Royal Court's expenditure with both the preservation of its Global Empire and the support of its luxurious lifestyle at mainland. The way in which such deposits were exploited by the Portuguese Crown and the powerful local elites, however, burdened colonial Brazil with excessive taxes. Some popular movements supporting independence came about against the taxes established by the colonial government, such as the Tiradentes in 1789, but the secessionist movements were often dismissed by the authorities of the ruling colonial regime. Gold production declined towards the end of the 18th century, starting a period of relative stagnation of the Brazilian hinterland. Both Amerindian and African slaves' man power were largely used in Brazil's colonial economy.
In contrast to the neighboring Spanish possessions in South America, the Portuguese colony of Brazil kept its territorial, political and linguistic integrity due to the action of the Portuguese administrative effort. Although the colony was threatened by other nations across the era of Portuguese rule, in particular by Dutch and French powers, the authorities and the people ultimately managed to protect its borders from foreign attacks. Portugal even had to send bullion to Brazil, a spectacular reversal of the colonial trend, in order to protect the integrity of the colony.

Empire:
In 1808, the Portuguese court, fleeing from Napoleon’s troops who had invaded Portugal, established themselves in the city of Rio de Janeiro, which thus became the seat of government of Portugal and the entire Portuguese Empire, even though being located outside of Europe. Rio de Janeiro was the capital of the Portuguese empire from 1808 to 1815. After that, the United Kingdom of Portugal, Brazil and the Algarves (1815-1825) was created with Lisbon as its capital. After João VI returned to Portugal in 1821, his heir-apparent Pedro became regent of the Kingdom of Brazil, within the United Kingdom of Portugal, Brazil and the Algarves. Following a series of political incidents and disputes, Brazil achieved its independence from Portugal on 7 September 1822. On 12 October 1822, Dom Pedro became the first Emperor of Brazil, being crowned on 1 December 1822. Portugal would recognize Brazil as an independent country in 1825.
In 1824, Pedro closed the Constituent Assembly, stating that the body was "endangering liberty". Pedro then produced a constitution modeled on that of Portugal (1822) and France (1814). It specified indirect elections and created the legislative, executive and judicial branches of government; however, it also added a fourth branch, the "moderating power", to be held by the Emperor. Pedro's government was considered economically and administratively inefficient. Political pressures eventually made the Emperor step down on 7 April 1831. He returned to Portugal leaving behind his five-year-old son Pedro II. Until Pedro II reached maturity, Brazil was governed by regents from 1831 to 1840. The regency period was turbulent and marked by numerous local revolts including the Male Revolt, the largest urban slave rebellion in the Americas, which took place in Bahia in 1835.
On 23 July 1840, Pedro II was crowned Emperor. His government was marked by a substantial rise in coffee exports, the War of the Triple Alliance, and the end of slave trade from Africa in 1850, although slavery in Brazilian territory would only be abolished in 1888. By the Eusébio de Queirós law, Brazil stopped trading slaves from Africa in 1850. Slavery was abandoned altogether in 1888, thus making Brazil the last country of the Americas to ban slavery. When slavery was finally abolished, a large influx of European immigrants took place. By the 1870s, the Emperor's control of domestic politics had started to deteriorate in the face of crises with the Catholic Church, the Army and the slaveholders. The Republican movement slowly gained strength. The dominant classes no longer needed the empire to protect their interests and deeply resented the abolition of slavery. Indeed, imperial centralization ran counter to their desire for local autonomy. By 1889 Pedro II had stepped down and the Republican system had been adopted in Brazil. In the end, the empire really fell because of a coup d'etat.
