Semar is a character in Javanese mythology who frequently appears in wayang shadow plays. He is one of the punokawan (clowns), but is in fact divine and very wise. He is the dhanyang (guardian spirit) of Java, and is regarded by some as the most sacred figure of the wayang set. He is said to be the god Sang Hyang Ismaya in human form.
The name Semar is said to derive from the Javanese word samar ("dim, obscure, mysterious"). He is often referred to with the honorific, "Kyai Lurah Semar" ("the venerable chief").
In depictions, Semar appears with a flat nose, a protruding lower jaw, a tired eye, and bulging rear, belly, and chest. He wears a checkered hipcloth, symbolizing sacredness. Like the other panakawan, the wayang kulit puppet does not have the elaborate openwork and ornamentation characteristic of the heroes In wayang wong, Semar always leans forward, one hand palm up on his back and the other extended partly forward, moving up and down, with an extended forefinger.
By tradition Semar has three sons, the other punakawans in the wayang: Gareng, Petruk, and Bagong (Bagong does not appear in Surakarta-style wayang). In some wayangs, he has a brother Togog (or Hyang Antaga), who is the servant-clown of a demonic hero.
As Semar is one of the few characters in wayang stories not from Indian mythology, his origin is obscure. One hypothesis is that he and his sons are old indigenous deities who became cursed and demoted to servants with the importation of the kshatriya heroes of the Indian epics. Semar also resembles the vidusaka clown figure of Indian Sanskrit drama.
The first known appearance of Semar is during the Majapahit era. In 1358 in relief of Sudamala in Candi TIgamangi, and in Candi Sukuh dated 1439. The relief was copied from a wayang story from the period, where Semar was first known to be appeared.
In one version of the Babad Tanah Jawi (the Javanese creation myth), Semar cultivated a small rice field near Mount Merbabu for ten thousand years before there were any men. His descendents, the spirits of the island, came into conflict with people as they cleared fields and populated the island. A powerful Hindu-Moslem priest, unable to deviate from his king's orders to continue cultivating the island, provided Semar with a role that will allow his children and grandchildren to stay. Semar's role was to be a spiritual advisor and magical supporter of the royalty, and those of his descendents who also protect the humans of Java can remain there.