 The coming of the Dutch ensured that the Portuguese had two enemies to deal with, so that finally the Portuguese were forced to sign a treaty with the Dutch and come to terms with their open economies.Finally, the Portuguese left Ceylon.Portugal was at war with its ruler, the King of Spain.