You may know Brazil as one of the few South American countries where Spanish is not the primary language- in Brazil, they speak Brazilian Portuguese.
Why? What is the history with Brazil and Portugal? For the beginning of that story, we should examine the era of colonialism- specifically, the 1500s. The Portuguese were a major colonial power alongside the Spanish.
In 1500, Pedro Cabral led Portuguese men to Brazil, where they found Native Indian tribes who were mainly hunter-gatherers and whose technique of "slash-and-burn" led to thin ground to plant crops. Rather than the resource-rich and 'civilized' societies the Spanish found in Mexico and Peru, the Portuguese in Brazil were met with a people without towns or domestic animals.
When Spain and Portugal, warring over colonization, set the Line of Demarcation, it divided easternmost Brazil from the rest of Brazil.
In 1580, the Spanish and Portuguese empires were combined. During this 60-year period of union, the Brazilians and the Portuguese settlers began moving westward and expanding Brazil into the enormous country it is today. The Portuguese began settling in larger numbers in Brazil when a number of sources of wealth were found- among them, gold, diamonds, sugar, and coffee growing.
Following, in the 19th century, Portugal was embroiled in a European conflict. Napoleon, disrespecting Portugal's neutrality, invaded the country and forced the royal family into Brazil, where they resided for many years after the conflict ended. When the royals went back to Portugal, the crown prince Pedro remained behind as "Regent Viceroy."
Pedro, in 1822, had himself crowned Emperor of Brazil, Pedro I as tensions with the 'mother country' persisted and Brazilian advisers convinced Pedro of independence. The conflict was worked out peacefully between Portugal and Brazil, bringing Brazil independence. Further, in 1889, Brazil switched from a monarchy to a democratic republic.
Certainly, the Portuguese have left a legacy in the country they once ruled. Yet Brazil is now a fully sovereign nation by its own right.
Sources: The World Economy.org, Geographia.com, Kids Corner Brazil.org