A temple dedicated to a deity in Gokarna city is mentioned in a fifth-century A.D. religious and historical literary work called Mahavamsa. It mentions that Mahasena (334-361) a Mahayanist zealot known for his temple destructions, who ruled a central kingdom of the island from the southern city of Anuradhapura destroyed temples dedicated to a deity in Gokarna and built Buddhist Viharas in its place. A twelfth-century commentary on Mahavamsa indicates that the destroyed deity temple had a lingam - a form of Shiva in it. The interpretation of deity temples into specifically a Siva temple by the commentary on Mahavamsa is disputed by Sinhalese writers such as Bandu De Silva.