A white genie, “jewel of the world,” lives in the sun and guards the gates of the sky. He has a brother, with seven heads, king of all the jinn. This white genie is entitled Maharaja Dewa, a Malay corruption of Mahadeva, the blue-throated Siva.
The distinction between this white genie and his black brother, who lives in the moon, is sometimes obliterated, as in the invocation used when opening the stage for a ma’yong play: “Peace be upon Mother Earth and Father Sky! ... Peace be upon thee, Black Awang, king of the earth! ... Peace be upon the blessed saints at the four corners of the world! ... Peace be upon my grandsire, Batara Guru, the first of teachers, who became incarnate when the body was first created, teacher who livest as a hermit in the moon, teacher who rulest in the circle of the sun, teacher of mine whose coat is of green beads, teacher of mine whose blood is white, who hast but one bone, the hair of whose body is upside down, whose muscles are stiff, who hast a black throat, a fluent tongue and salt in thy spittle.”
Incidentally it is interesting to find the Malay still paying homage to Siva as Nataraja, lord of dancers and king of actors. In another Malay invocation the Black Genie too is painted as “having but one bone, the hair of whose body is upside down, who can assume a thousand shapes.” Though he has “one foot on the heart of the earth,” yet this Black Genie also “hangs at the gate of the sky.”
Batara Guru or Divine Teacher is the Malay name for Siva. And it is not surprising to find that on accepting the Hindu deities into their spirit-world Malays paid great homage to Siva under his sinister aspect of Kala the destroyer of life. The spirit of the tides is often associated with the spirits of the sun and moon, and, again, the Malay expressly identifies him with Siva and makes Kala the dread god of the sea.
From Shaman, Saiva and Sufi: A Study of the Evolution of Malay Magic by RO Winstedt