 Once Portugal obtained its freedom from Spain in 1640, the Netherlands settled for peace with Portugal.Then they divided the occupied areas of Ceylon amicably under a treaty signed in Goa.Slowly, the Dutch became the rulers of coastal and outer areas of Ceylon and Indonesia, and the Portuguese were left with smaller pieces of territory than those of the Dutch and the English.