How did Portugal gain an empire in Brazil?

APortuguese mariners were first to explore the Amazon basin.
BThe Treaty of Tordesillas, designed to divide the Atlantic between Spain and Portugal, unintentionally granted Brazil to Portugal.
CInitially, the Spanish had no interest in South America.
DBrazilian natives successfully resisted Spanish invaders.
ENone of these answers is correct.

Verified Answer :

The answer is B) The Treaty of Tordesillas,
designed to divide the Atlantic between Spain and Portugal, unintentionally
granted Brazil to Portugal. This was made when the Portuguese king John
II negotiated with King Ferdinand and Queen Isabella where the boundary lines
were moved to the west. In doing so, it enabled the Portuguese to explore
Eastern Africa and grant them lands that make up the Eastern portion of Brazil.