The kingdom of Prambanan was attacked and colonized by the Pengging country. The new ruler, Bandung Bondowoso, saw the beauty of Lorojonggrang, daughter of the Prambanan king, and wanted to make her his wife. Lorojonggrang agreed but only if Bondowoso could finish building a temple overnight with 1,000 statues. Bondowoso enlisted his genie troops but Lorojonggrang tricked them into thinking dawn had arrived, causing them to leave with only 999 statues completed. Upon discovering this, Bondowoso cursed the unfinished statue.