Treaty of Tordesillas
The Treaty of Tordesillas was a treaty between Portugal and Spain in 1494 in which they decided to divide up all the land in the Americas between the two of them, no matter who was already living there. Pope Alexander VI was the Pope at the time of the treaty. He drew an imaginary line 2,193 kilometers to the west of the Cape Verde Islands, gave Portugal the land to the east of this line, and gave Spain the land to the west of this line. King Ferdinand II of Aragon and Queen Isabella of Castile were the rulers of Spain at the time and together they signed this treaty in Tordesillas, Spain, which is how the treaty got its name. This also changed Spanish and Portuguese exploration of the New World, which in part explains why the Portuguese-speaking part of South America became one country called Brazil and the Spanish-speaking colonies split up into many different independent countries including Argentina, Colombia, and many others.
Spain governed the territories West of the line and Portugal governed the territories east of the line.