When you look at South America every country except Brazil is a Spanish speaking country. How did this come to be?
This is one of those stories that has almost no good place to start. So I’m just going to pick 1400 and go from there.
In 1400 the Reconquista was going well and the Christian nations had largely gained control of Iberia leaving only Granada in the south unconquered. Politically the situation more or less looked like this. It’d be nearly another century before it was completed but by 1400 Castile and Portugal were beginning to look outside of Iberia a bit.
In particular Prince Henry “the Navigator” was assigned as governor of the Algarve (South Portugal) and then granted certain monopolies of trade. Because of this monopoly around 1420 he began to aggressively pursue discovery and trade. In particular he was looking for the “Gold Coast.” The Iberians knew there was a source of gold somewhere to the south of the North African coast. So he began to sponsor voyages of discovery and trade in pursuit of sources of spices, gold, and slaves. During this period his captains discovered and settled the Azores Islands as well as the Madeiras and the Cape Verde Islands. They also explored the near African coast. By 1460 and Henry’s death the Portuguese had explored to somewhere around Sierra Leone or maybe Liberia.
The sea in this region was generally nicknamed the Dark Sea and the experience of these early navigators was critical to opening the age of exploration. Every year the Portuguese sailors and their ships got better and the regular almost yearly ability to pass formerly impassable seas built their confidence. As you can imagine being able to do things like sail past Cabo Não (Cape No), the traditional edge of the world, was a huge morale booster.
And once Henry and his captains began to open new trade routes, other people started getting the bright idea that they might like to do the same thing. So Castile started slowly gathering its own captains. But they were behind the Portuguese in experience, knowledge (especially maps) and equipment.
In 1475 this trade rivalry also became a secession rivalry. When Henry IV of Castile died, his throne was contested between his daughter Joanna and his half-sister Isabella. Complicating matters Joanna was the queen of Portugal (married to King Afonso V) and Isabella was married to Ferdinand II future king of Aragon. So the fight over Castile developed overtones of a fight for supremacy over Iberia. On land Isabella was victorious. While at sea Joanna’s supporters were dominant. In 1479 the Treaty of Alcáçovas was signed recognizing those facts. Isabella got Castile. But Portugal was granted a monopoly on African trade and practically a monopoly on all Atlantic sailing to the south.
So along comes the man we know as Christopher Columbus. He heads to the premiere sailing power of the day, Portugal, and proposes sailing directly across the Atlantic to the Orient. By this time the Portuguese (Bartholomew Diaz) had made it past the Cape of Good Hope and they thought they had largely resolved the route to India and weren’t interested in starting a new project. But Isabella of Castile and her husband Ferdinand II of Aragon were a lot more amenable to the idea. After all the “round Africa” route was closed to them by treaty. So they sponsored Columbus and he famously sailed the ocean blue in 1492.
Well that complicated things. Alcáçovas didn’t address the Americas because it didn’t foresee the Americas. So between a series of Papal Bulls and treaties hammered out between the states, a new agreement was made. Generally this is summed up as the Treaty of Tordesillas of 1494 but there were a series of agreements. This basically divided the Atlantic into a Castilian zone in the west and and Portuguese zone in the east, with an dividing line 100 leagues west of the furthermost western Portuguese island. Of course the treaty didn’t specify who’s leagues (there were several competing standards) nor did it specify which island was the starting point, because at the time no one knew if the Cape Verde or the Azores were further west. And neither archipelago had been properly surveyed. But no one was too worried. The Caribbean was a long way away and the precise line didn’t seem to much matter. It was thought it would be simple. The Americas would go to Castile and Africa to Portugal.
And then suddenly six years later in 1500 Pedro Álvares Cabral discovered Brazil, which sticks out a lot more further east than the Castilians anticipated. There’s at least some indications that the Portuguese had at least an inkling that something might be there. So it’s possible that the Portuguese intentionally pushed for a line that would include Brazil (if it existed) on their side of the line. Because while no one knew for certain where the line was, or where Brazil was for that matter. At least part of Brazil was clearly in Portuguese territory, as this map of possible lines shows.
The Portuguese were a bit slow to establish colonies in America but by the 1530s the first colonies were established. Over time the Tordesillas line was abandoned and newer treaties were periodically signed to update the borders. In the Americas these almost universally favored the Portuguese. And the coastal borders were more or less finally set in the 1750 Treaty of Madrid. The interior borders were a lot more vague and were generally established based on a principle of discovery and accessibility. So although most of the Amazon Basin was well across the Tordesillas line in Spanish territory it was incredibly difficult for the Spanish to get to, while the Portuguese could just sail up the Amazon. So the basin went almost entirely to Portugal.
The amazing thing though is, Portugal and Castile/Spain largely abided by the treaties. The line drawn to divide the world was a principle that was maintained for hundreds of years. Even during the period where the two kingdoms were combined both largely respected the concept of and implementation of their own spheres of influence.