The royal citadel of Sigiriya was the brainchild of King Kasyapa (447-495 A.D). According to popular belief after killing his father and chasing his brother Moggalana out of Sri Lanka Kasyapa left Anuradhapura and build for himself at the impregnable rock of Sigiriya a palace and a city modelled on the mythical abode of Kuvera, the God of Wealth. During its period of glory from 477 to 495 A.D Sigiriya was much more than just a fortress, it was one of the most unique cities in the history of Sri Lanka.
Eighteen years after it was built Kasyapa met his end at his own hands by a strange quirk of fate. During battle with a Moggalana eager for revenge, Kasyapa momentarily thought that his army had deserted him and perceiving defeat staring him in the face slew himself with his own dagger.
This page: http://www.cockatoo.com/english/srilanka/srilanka_sigiriya_history.htm