After the death of King Senarath in 1635, Maha Astane alias Rajasinghe II ascended the throne, his reign is regarded as the beginning of a new era in the Kandyan history.  King Rajasinghe II was aimed at expelling Portuguese from the country.

In 1638, Portuguese invaded Udarata for the last time under the leadership of General Diago de Mello. A fierce battle broke at Gannoruwa and Portuguese troops were annihilated by the troops of King Rajasinghe II. The king announced that in addition to the people in Udarata, all the People in Sri Lanka are his people. He used the epithet ‘Trisinhaladeeshwara’ (ruler of all 3 parts of Sri Lanka namely Ruhunu, Pihiti and Maya) in highlighting his singnificance as the only king in the country. He expected to re-unite the island and to expel Portuguese and to do so, he realized that the support from a nation who owned naval power is essential.

During that time, Dutch were a nation who were involved in trade and spreading the religion in Asia. King Rajasinghe II asked support from Dutch officials in India and Java and in return, hoped to give the trade monopoly of cinnamon in the country.

As a result, in the period of 1638-1658, king Rajasinghe II together with Dutch, expelled Portuguese from Sri Lanka. When doing so, a treaty was signed among both the parties in May 1638. Dutch promised to assist Udarata in expelling Portuguese and the king promised to bear the war expenses as well as to provide them with a port and the sovereign right of trade.  Thus, in 1638, Kandyan army along with Dutch conquered the Portuguese fortress in Batticoloa, Trincomalee    in 1639, Galle in 1640 and Colonbo in 1656. Even though the king intended to expand the Kandyan kingdom to the areas ruled by Portuguese, his hopes were not fulfilled since Dutch were reluctant to handover the coastal region from Negambo to Galle where cinnamon was successfully cultivated. Later it was known that, the treaty of 1638 was made in 2 copies and it was mentioned in the kings copy that all ports captured from the Portuguese by the Dutch may be kept under the control of the Dutch only if the king so desired. However, the conditional clause “if the king so desired” wasn’t included in the copy of the Dutch. The king was in the opinion that Dutch deliberately omitted this clause from the document written in Portuguese.

In the meantime, Portuguese tried to enter into a treaty with the Kandyan king and discussions were done between a Portuguese emissary and the king in 1648-1649. The king expected the Portuguese to accept the king Rajasinghe II as the legal ruler of Sri Lanka and that the king will allow catholic priests to live in the hill country and the Portuguese should allow Buddhist monks to live in the maritime areas. On the other hand, Portuguese were on the condition that   the king should name the Portuguese territory in the country. Both the parties rejected the conditions and the discussions rendered unsuccessful.

The Dutch didn’t declare war against Portuguese during the period 1642-1650 due to the truce between them in the Europe. However, a war broke in 1652 and seized the forts Kaluthara and Anguruvathota in 1655, captured Colombo fort on 12th May 1656, Mannar on February 1658 and Jaffna fort in Jume 1658. Since then, most of the areas held by Portuguese were passed into the hands of Dutch.

On the other hand, Dutch who captured Negambo fort in 1644, tried to capture Sathkoralaya too. But king Rajasinghe II defeated them and annexed Sathkorala to the Udarata kingdom and Sabaragamuwa if Satharakoralaya in 1652. By 1658, the region from Puttlam to Negambo was owned by the Kandyan kingdom allowing the people to engage in trade with foreign trader openly. Likewise, by 1656, king had widen his territory to its maximum strength by shattering the belligerent policy of Governor Van Goens.

By the later stage of King Rajasinghe II’s reign, the sordial relationship between the Dutch and the king showed signs of shattering. The King stated to follow an anti-Dutch policy. HE set fire to the regions captured by the Dutch; specially the cinnamon forests. He brought the settlers of those regions to Udarata with their consent or by force and settled them there.  As a result, a lot of Roman Catholics settled in Ratnapura, Avissavella, Ruwanvella, Galgama, Kandy, Weuda and Wahakotte. In addition, he abolished the trade between Dutch and Sinhalese and prevented supplying food to the dutch. And two Dutch emissaries who visited Kandy for discussions were kept in custody.

In return, by 1659 Dutch captured the port of Kalpitiya and in 1665-1668 Trincolamalee, Kottiyarama and Batticoloa which were owned by Udarata. Also, they spreaded their territory to eastern and southeastern coast and some regions of Sabaragamuwa and Sathkoralaya. Meanwhile, people were against the king due to his tyrannical acts and a rebel broke in 1664, which was widely known as the ‘rebel of Nillamba’. This was led by Ambamwela Rala. Thus due to the internal chaos, the king was unable to secure his territory.

But later in 1670-1675, king Rajasinghe II suddenly assaulted the areas ruled by Dutch. He attacked Arippu and Ma-oya area in North West, Satharakoralaya and Sathkoralaya in west, Kottiyarama, Trincomalee, Batticoloa and Panama in east and won them. Thus, Udarata successfully manages the challenge caused by Dutch by 1659.

King Rajasinghe II proved to be a strong king who served a lot in expanding the Kandyan territory and being a cause to change the Dutch attitude towards Kandyan kings. But, two of  his acts  later contributed  to cause chaos in the kingdom.  He was the king who pioneeder in starting marital relationships with Nayaks in Madurai, India. His chief consort was a Nayak princess. Later kings of Kandy followed  his path and brought queens from India. This culminated later in passing the Kandyan throne  to Nayaks in 1739.

Also, in the later years of his life, he was addicted to drugs and spent his time mostly  at the palace in Hanguranketha. So the KIndyan chiefs improved their power over the court and they won the hearts  of people. This resulted in Kandyan chiefs to create an independent  power over their region during the reigns of later kings.