The original line of demarcation between Spain and Portugal was located just off the South American coast at a north-south line 100 leagues west of the Cape Verde Islands. Territory west of the line belonged to Spain and east of the line belonged to Portugal.
After Portugal objected to the original line, the Treaty of Tordesillas in 1494 established the demarcation line 370 leagues west of the Cape Verde Islands. This gave Portugal control of Brazil and Spain control of everything else in the New World. Spain also controlled territory south of a line 100 leagues south of the Azores. Pope Alexander VI created the first line of demarcation in 1493 after a colonial dispute between Spain and Portugal.