The time came when Prabu Baka wanted to expand his territory by conquering the neighboring kingdom, Pengging. The king of Pengging, Prabu Damar Maya, responded and sent his son, Raden Bandung Bandawasa, to defend their kingdom.
Raden Bandung Bandawasa, renowned for his supernatural power, won the war. He managed to kill Prabu Baka. Soon, Baka kingdom fell into the hands of Bandung Bandawasa.
In victory, Bandung Bandawasa entered the palace where Prabu Baka used to live. When he saw Roro Jonggrang, he fell in love. He wanted to marry her.
Of course, Roro Jonggrang didn't want to marry the man who had killed her beloved father. She refused. However, Bandung Bandawasa persuaded her to marry him. In the end, Roro Jonggrang accepted his marriage proposal with two conditions that seemed impossible to fulfil.
"I want you to make a well and a thousand temples in just one night. They must be ready before the sun rises tomorrow morning," she demanded. She felt sure that it would be impossible for Bandung Bandawasa to fulfil her requirement and marry her.
Bandung Bondowoso agreed. After a few hours, he was able to make a well with his great supernatural power.
"Done!" he said with satisfaction. "I've finished the well, now the temples. I will ask my genie soldiers and helpers to help me build them."
Bandung Bandawasa then summoned genies and ordered them to build one-thousand temples. The genies worked hard and soon, there were able to build nearly 999 temples.
Seeing that the job was almost completed, Roro Jonggrang panicked. “Marrying Bandung Bondowoso is the last thing I want to do in my life. I have to make him fail one way or another,” she thought.
Then she had a great idea. She gathered all her servants and village girls and asked them to help her. "Listen, the genies are building the temples and it's unfair! We have to collect a lot of straw. Come on! Hurry up!" said Roro Jonggrang to them.
"What are you going to do with the straw, Princess?" asked one of the women.
"We will fake the dawn by burning the straw and pounding rice pestles. When the sky gets red and the sound of people pounding rice pestles is heard, the genies will think that the sun is rising and they will stop working and run away." she added.
So they did. They burnt the straw and started pounding the rice pestles in their homes as if they had been grinding some rice.
It worked! Seeing the reddish sky and hearing the sound of people pounding rice pestles, the genies thought that the sun was rising. They fled, leaving the last temple unfinished. They did not know that they had been tricked by Roro Jonggrang and her women.
Seeing this, Bandung Bondowoso was angry. He knew that Roro Jonggrang was trying to trick him and fail his attempt to marry her.
"You cannot fool me, Roro Jonggrang. I have built 999 temples. I just need one more temple to fulfil your requirement. Now, you'll complete my task and be the one-thousandth temple!"
Suddenly, Roro Jonggrang's body became stiffer and stiffer. She could not move. The curse had made her become a statue.
It is believed that Ratu Baka's site near Prambanan area was the palace of Prabu Baka, whereas the 999 unfinished temples is now known as Candi Sewu (a thousand temples). Arca Durga (Durga Mahisashuramardini), a very beautiful statue in the north part of Prambanan's main temple, is believed to be a manifestation of the cursed princess. People name it the statue of Roro Jonggrang.