Conflicting issues arose between what was granted by law in the Treaty of Torsedillas (1494), and the subsequent reality of colonial expansion: the Spanish, eastward from the Pacific coastal plains (though restrained by the Andes), and the Portuguese, westward (aided by the waterways and lowlands of the mighty Amazon). The Treaty of Madrid (13 January 1750) – that determined the border between the Spanish possessions and southern Portuguese Brazil – had first enunciated the principle that new states, at the time of their creation shall have dominion over the lands that were settled as colonies. It implicitly opened the door to claims by prior possession in the vast lands of the north.