Here is what U-S-History.com says:
Treaty of Tordesillas
Upon returning to Spain in 1493 after his first voyage, Christopher Columbus contacted Pope Alexander VI (a Spaniard by birth) to report his discoveries. Acting as the great European arbiter of the day, the pope then issued a bull (decree) that divided the New World lands between Spain and Portugal by establishing a north-south line of demarcation 100 leagues* west of the Cape Verde Islands. Undiscovered non-Christian lands to the west of the line were to be Spanish possessions and those to the east belonged to Portugal.
News of this decision was not warmly greeted by the Portuguese, who argued that previous agreements conflicted with the pope's decision.
In the spring of 1494, representatives of Spain and Portugal met in the Spanish town of Tordesillas and negotiated a mutually satisfactory solution to their dispute. The line of demarcation was relocated to a position 370 leagues west of the Cape Verde Islands. (It was impossible during this age to determine precisely the impact of this agreement on account of the nagging difficulty of establishing longitude accurately.) However, Portugal emerged with an enhanced position by gaining a larger portion of South America (Brazil). Even with this modification, Spain had gained control (on paper) of most of the New World.
The pope granted his official recognition of this agreement in 1506. Spain and Portugal, with a few exceptions, remained loyal to the terms of the treaty; the Portuguese would expand deep into Brazil beyond the demarcation line, but Spain did not object. The natives of these regions, needless to say, were not consulted about the assignment of their homelands to others and competing powers in Europe totally ignored the line.
For years following 1494, the Spanish lamented their consent to the treaty, convinced that they had received the short end of the stick. Their initial discoveries in the New World yielded little mineral wealth, but much disease and discomfort. Their evaluation of this bargain with Portugal changed dramatically in the 1520s as the riches from Aztec Mexico began to be exploited.
In the Treaty of Zaragoza (1529), the demarcation line was extended through both poles and encompassed the entire world.
Quod scripsi, scripsi.