The Palace Gelgel about the year 1568 in a calm atmosphere, where King Sri Aji Dalem Sigening decreed putranda Barak Ki Sakti, so back to the place of blood spilled her Mother in Den Hill (North Bali). Barak Ki Panji with Mother Siluh Pasek, after pleading self-presented to Sri Aji Dalem then went to Den Bukit escorted by forty men escort the king who spearheaded by Ki Kadosot.

Their journey into the dense forest is very terrible, very cold air menggigilkan, through the crevices of the hills, climb higher mountains, down the steep chasms, and finally they arrived at a place that is somewhat flat. At that place they let go of tired as she unwrapped their provisions. Once they eat rice cake, they pray, and then they sprinkled water / tirta by Sri Luh Pasek, for the salvation of his journey, later the place was named "Yeh KETIPAT". Barak Ki Panji entourage had arrived in the village of Gendis / Panji safely.

Tersebutlah Ki Pungakan Gendis, village leaders who occasionally not ignore complaints of residents. He ruled solely to meet poor appetite, pleasure is gambling, especially cockfighting chicken. Because of this attitude Gendis village leaders, then more and more hated by his subjects, and in the event of war, he was killed by Ki Barak Panji.

Gendis Village in command by Ki Barak Panji, a leader of a courageous, fair and wise. Barak Ki Panji or heard of a Chinese ship stranded layer, then arises the compassion to help the owner of the ship. Majesty, together with Ki and Ki Kadosot Dumpyung can help save a stranded vessel layer immediately weighing it on the beach. After his help succeeded, the king awarded the entire contents of the vessel is in the form of pottery such as plates, bowls, and coins whose numbers are very large.

Leadership Ki Barak Panji increasingly popular, he always pays attention to people's circumstances, conduct development in all areas of both physical and spiritual. Therefore, so then all the villagers of Gendis and Surroundings, unanimously to oust the king becomes king, who then crowned with the title "Ki Gusti Ngurah Panji Sakti".

To find the place a bit flat, then the City of Gendis and Goda Pura Bale Agung his move to the North Village in Panji. At the new site is complete with King founded the palace of heaven Pura Bale Agung. In order to meet the interests of his village to deliver praying in the temple and the ceremony outside the temple, and for other entertainments, the king made a set of gamelan gongs, each of which was named as follows:

· Two gong was named Bentar Kedaton • A named bendennya Ki Ora Crow • A named Ki Tudung keniknya Enemy · Binoculars named Glagah Ketunon · Drum called Dark Kesanga · Altogether named "Juruh Satukad". For prestige and excellence Ki Gusti Ngurah Panji Sakti, the Kyai Alit Mandala, headman Bondalem area subject to the king. Then, at their option, the Kyai Alit Mandala, he was reappointed village head who reigned in the region Bondalem, Eastern Buleleng.

At approximately in 1584 AD, to search more strategically place the fence removed North Town Village Panji Sangket. In this new place is always king rejoices with his people while building and then place this new name it "Sukasada" which means pobud Besruka Ria.selanjutnya in tell thanks to the benefits of Ki Gusti Panji Sakti, the Kyai Sasangka Adri, Village One area of ​​Sugar Cane (West Buleleng) subject to the king. Then at the discretion of the Kyai Sasangka Adri he reappointed a headman in the area of ​​Western North Bali.

To further strengthen the region memepertahankan, Ki Gusti Ngurah Panji Sakti immediately formed a troop called "Truna Goak" in the village of Panji. Force was formed with the street art game memperpolitik crows, which in Bahasa Bali called "Magoak-goakan". From this game finally formation Goak Truna troops numbering 2000 people, consisting of the young officer well-built, agile, and have high morals under the leadership of the war who named Ki Gusti Tamblang sampun and represented by Ki Gusti Made Batan.

Ki Gusti Ngurah Panji Sakti and the sons of the King and other officers, led the troops Truna Goak that everything is ready to fight left for local Blambang. In this battle King Blambangan killed on the battlefield thus Blambangan kingdom with its entire population is subject to the Raja Ki Gusti Ngurah Panji Sakti. News of this victory soon be heard by the King of Mataram Sri Dalem Solo and then he presented an elephant with 3 people pengembalanya to Ki Gusti Ngurah Panji Sakti. Subdue kingdoms Blambangan must be redeemed by losing a son named Ki Gusti Ngurah Sire Nyoman Panji, where it resulted in His Majesty the King always seems durjan mope. Only thanks to advice Purohito Pandita, finally sadness Majesty may forgotten and then the exercise was to build a new palace in the north Sukasada.

In about the year Candrasangkala "Manon Blind King Single" or 6251 or equal Candrasangkala Caka year 1526 or 1604 AD, Ki Gusti Ngurah Panji Sakti ordered his people cleared land to build a castle on top of tall grass prairie, which is a field where cattle herdsmen , where is found the people to plant Buleleng. In the field of Buleleng was king saw some fruit cottages that line extends. It was there that he established a new palace, which according to the calculation of days is very good at that time, fell on the date "March 30, 1604".

Furthermore, the newly built Palace of the King was called "Soweto" because remember that the heroism Raja Ki Gusti Ngurah Sakti Pnji are like lions.

Thus the birth day of Singaraja City on March 30, 1604 that based on history Ki Gusti Ngurah Panji Sakti, while the name of Buleleng was the original name gambal corn or corn gambah that many planted by residents at that time.