The Ratu Adil, literally meaning Just King, is a messianic figure in Indonesian folklore. He (or she) will establish universal peace and justice in the manner of similar figures, such as King Arthur in European folklore. The Ratu Adil is first mentioned in the Pralembang Joyoboyo, the set of prophecies ascribed to King Joyoboyo of Kediri.
The prophecy predicts that the Ratu Adil will be poor and at first unknown. This was highly advantageous to most early nationalist leaders. The prophecy also talks about the decline of the nobility as real rulers. The mantle of Ratu Adil has been claimed by a number of leaders in recent Indonesian history, including Diponegoro, Sultan Hamengkubuwono IX, and Presidents Sukarno and Megawati.