Once upon a time there was a king who ruled Mataram Kingdom. His name is Amangkurat IV. He was the grandfather of Sultan. He often meditated in a nearby forest,called Garjitawati.
One day, when a gardener was gathering grass for his cattle in the forest, he looked for some water because it was so hot. He found a small pond and when he was going to drink some water from it, a dragon came out of the underwater,but it was so friendly to him. The dragon said that if Sultan wanted to build his palace, it was supposed to be located in that forest.
Then it disappeared.Then Sultan started to build the palace in that forest. He demanded strong and old woods and the forest where those woods lied was said to be home of genies and spirits. His lumberjacks could not find anything to eat and the only thing they could have were some rice and water for three days, or sometimes they could not have anything.Then Sultan ordered that the main pole in the palace’s hall had to be built from special wood, which would give strong impression.
One night, a servant who was sleeping in the forest heard loud and deep voice. The voice introduced itself as Kyai Jegod. The servant saw that Kyai Jegod was an old, tall, and massive tree. He said that he would voluntarily let himself be cut to make the main pole so that he could stay inside it forever.
The servant told it to Sultan and Sultan let Kyai Jegod stay inside it forever, while Kyai Jegod became the protector of that palace since then.