The first Europeans to visit Sri Lanka in modern times were the Portuguese: Lourenço de Almeida arrived in 1505 and found that the island, divided into seven warring kingdoms, was unable to fend off intruders. The Portuguese founded a fort in the port city of Colombo in 1517 and gradually extended their control over the coastal areas. In 1592, the Sinhalese moved their capital to the inland city of Kandy, a location more secure against attack from invaders. Intermittent warfare continued through the 16th century.
Many lowland Sinhalese converted to Christianity due to missionary campaigns by the Portuguese while the coastal Moors were religiously persecuted and forced to retreat to the Central highlands. The Buddhist majority disliked the Portuguese occupation and its influences, welcoming any power who might rescue them. When the Dutch captain Joris van Spilbergen landed in 1602, the king of Kandy appealed to him for help.
Rajasinghe II, the king of Kandy, made a treaty with the Dutch in 1638 to get rid of the Portuguese who ruled most of the coastal areas of the island. The main conditions of the treaty were that the Dutch were to hand over the coastal areas they had captured to the Kandyan king in return for a Dutch trade monopoly over the island. The agreement was breached by both parties. The Dutch captured Colombo in 1656 and the last Portuguese strongholds near Jaffna patnam in 1658. By 1660 they controlled the whole island except the land-locked kingdom of Kandy. The Dutch (Protestants) persecuted the Catholics and the remaining Portuguese settlers but left Buddhists, Hindus and Muslims alone. The Dutch levied far heavier taxes on the people than the Portuguese had done.
A legacy of the Dutch period in Ceylon are the Dutch Burghers, a people of mixed Dutch and local origin.