The Treaty of Versailles divided the New World between Spain and Portugal.
In 1494, Spain and Portugal reached an agreement called the Treaty of Versailles. The two countries decided to draw a line in a map of the world and agreed that any new land discovered to the east of the line will belong to Portugal, and any new lands discovered to the west will belong to Spain.
They did not know it at the time, but the line went down the middle of South America, and that is why Brazilians today speak Portuguese while most of the rest of South Americans speak Spanish.
Hope this helps :)