[2][6] Kotte era poem Panditha Perakumba Siritha describes a story of how god Upulvan transfigured a log of a kihiri tree and floated it to the sea beach of Devinuwara kingdom in Southern Sri Lanka.
On the night prior to the incident, King Dappula I (661-664) who was the reigning monarch, had a dream about the arrival of this transfigured kihiri log.
[8] In the medieval period local deities, namely Upulvan, Katharagama, Saman and Vibhisana came to be worshiped as protectors of the island.
A second temple for god Upulvan was erected by King Parakkramabahu IV at Aluthnuwara, Satara Korale in Kegalle District.
According to the recorded history, the Devinuwara multi-religious complex, the Buddhist temple and the Upulvan devale (shrine) was started by King Dappula I (Dappula-sen) in the 7th century AD.
[9] The origin of the Esala festival of Devinuwara goes back to the times of King Parakramabahu II who had reconstructed the dilapidated temples during his reign.
[17][18] In 1587, a Portuguese army led by Thome de Sousa Arronches attacked the sacred city and destroyed the temples to distract king Rajasinha I's siege of Colombo.
Today Vishnu is venerated by a large number of devotees in Sri Lanka, and is specially revered as the custodian of the island.