Legend holds that, in the first Muslim-Javanese kingdom of Demak (16th century), existing practices and customs of the Hindu-Javanese state were transformed into a festival to attract the common people to Islam. Soelarto (1979) relates the legend, at least as it is held by members of the Yogyanese aristocracy, as follows:
Not long after Raden Patah was invested as the first sultan of the Demak Sultanate with the title Sultan Syah Alam Akbar or Sultan Ngabdil Suryongalam, he discontinued the enactment of the ceremonial [animal] sacrifices which had been carried out by the Hindu-Javanese kings before him. This tradition was considered at odds with the principles of Islam. The discontinuation of this tradition caused restlessness amongst the common people. The people, who over the centuries had become accustomed to life with traditions based on ancient beliefs, could not accept the attitude of the new king. The restlessness that arose interfered with the stability of the kingdom, which was plagued with another problem–the epidemic spread of a contagious disease.
At the suggestion of the wali sanga [the Nine Disciples who are credited with spreading Islam throughout Java], the tradition based on ancient beliefs was resurrected. Yet it was given an Islamic character. Animal offerings were sacrificed according to Islamic custom. The opening and closing prayers of the ceremony were Islamic prayers presented in an uplifting manner by sunan Giri and sunan Bonang [two of the wali sanga]. Soon after the performance of the sacrificial ceremony by the kingdom the spread of the contagious disease was halted and tranquility was restored. Once a state of calmness and prosperity existed, the wali sanga initiated attempts to spread Islam to the people. To support the spread of Islam, the Great Mosque (of Demak) was built as the public center for the observance of religious duties. According to the chronogram geni mati siniram ing janmi, the Great Mosque was completed in [AJ] 1408.
But even after the building of the Great Mosque and the energetic attempts of the wali sanga, the spread of Islam was not experiencing much progress. The number of adherents to Islam were still few in number. The majority of the people, above all the villagers, were still unwilling to recite the two lines of the Witness [There is only one God, Allah; Muhammad is Allah’s apostle] as a declaration of embracing Islam. The wali sanga held a meeting. They were of the opinion that, to convince the people and to be true to the teachings of Islam, they would have to carry out their mission in stages and with great wisdom. They would have to take a courteous and informal attitude in their endeavors and not condemn the people’s customs and the elements of their culture. Furthermore they should capitalize on these elements as a means to their end. Above all they should make use of the peoples’ language, customs, and arts.
Sunan Kalijogo [another, and perhaps the most revered, of the wali sanga] knew that the people loved celebrations, the bustling festivity associated with religious ceremonies. Moreover, if such festivities were accompanied by gamelan, they would most certainly attract the attention of the people. From this arose sunan Kalijogo’s idea to have the state mount a celebration to commemorate the birthday of the Prophet Muhammad in the month of Rabiulawal [Mulud]. To attract the attention of the people and get them to enter the Great Mosque, a gamelan would be placed and sounded in the yard of the mosque. The wali would then be able to proselytize directly to the people.
Even though the playing of gamelan in the mosque yard could be interpreted as undesirable according to Muslim thought, sunan Kalijogo’s idea was accepted by the wali sanga because it would aid the spread of Islam. The sultan agreed to realizing the idea of sunan Kalijogo. Thus in the month [Mulud], a week before the birthday of the prophet, a celebration called sekaten would be enacted. In the yard of the Great Mosque, a place specifically for the sounding of the gamelan, called the pagongan, was built. The meaning of pagongan is “the place of the gamelan” which was made by sunan Giri. It is said that part of the repertoire of gamelan pieces was created by sunan Giri, and another part of it by sunan Kalijogo. During the week gamelan is heard continuously, except during daily prayers and from Thursday evening to after Friday prayer. (my translation of Soelarto 1979:15-17)
Although it is impossible to prove that the tradition of Sekaten originated in accordance with the details of the above legend, or even that all of the wali sanga, including sunan Kalijogo, were historical personages, the important point here is that this is how individuals in the aristocratic stratum of Yogyanese society explain the existence and significance of this yearly observance. The connection between Hindu-Java and Muslim-Java is compelling to the Javanese, and understandably so given the present-day Javanese world view which bridges seemingly incompatible beliefs that originated in one or the other of these two epochs. The legend presented above serves to illustrate how the Javanese in general seek continuity with their past, even in times of dramatic change (such as the end of the millennium long Hindu-Javanese period and its replacement with elements of the Islamic world view).