what was the purpose of the treaty of Tordesillas

A: to end a war between Spain and Portugal
B: to divide the non-European world between Spain and Portuga

B: to divide the non-European world between Spain and Portugal