The Royal line of Buleleng, Singaraja dates back to more than 500 years ago when the son of the King of Gelgel, Pandji Sakti, left Klungkung in order to establish a new kingdom in Den Bukit, Buleleng, North Bali. Upon reaching the mountain peak, he felt very thirsty, so he plunged his magic kris into the ground and water flowed from that spot. To this day, water flows from this spring making life possible for the animals and people who live at the top of this mountain range. After uniting Den Bukit (now Buleleng, North Bali) he became the king and built two palaces named ‘Sukasada’ just South of Singaraja and a third palace in Singaraja in 1604. This was the beginning of the Kingdom of Buleleng and Singaraja, the capital town of Buleleng regency. In the mid 19th century, the Dutch invaded Singaraja, destroyed the palace and deposed or killed most of the Royal family. By 1858, the Dutch appointed a new Raja of Buleleng. The young, intelligent king supported the rebellion against the Dutch in Banjar in 1872. In 1929, his son, I Gusti Putu Djantik, was appointed by the Dutch to be the regent of Buleleng. He rebuilt the Puri Agung and then along with the Dutch, founded the library of Lontar named Gedong Kirtya in front of the Puri grounds. He died in 1944 and was succeeded by his eldest son, Anak Agung Pandji Tisna, who was the last person to hold the title of Raja Buleleng.