The prominence of Hindu-Buddhist mythology, imagery, and religiosity in Islamic Java has puzzled observers. The shadow play with its Mahābhārataand Rāmāyan a-derived subject matter is a prime example. Another is the late 18th-century 'renaissance' of Old Javanese literature in the Islamic kingdom of Surakarta, which produced classics still celebrated today. Beyond a misguided assumption that the Javanese were so strongly disposed to syncretism that blatant doctrinal clashes did not bother their intellectuals, the factors that animated this enterprise remain obscure, despite its critical consequence for the development of Javanese religiosities. I scrutinize several unstudied manuscripts and piece together information from hitherto unconnected scholarship to try to understand these factors, with reference to pressing circumstances, living theories, as well as people who think, feel, and hope. First I examine Javanese theoretical ideas about the relationship between the Hindu-Buddhist and Islamic traditions and the connection between epic narratives and the present and future of Java. Against this background I consider the initiative, in 1778, to reinterpret the ancient epic heritage, beginning with the Arjunawiwāha (composed c. 1030). Focal points of interest in the Islamic hermeneutics of this poem were a quest for inner potency and the resulting external power of violence, knowledge and revelation, and future kingship. KEYWORDS Cultural history of Java; historical anthropology of religion; Islam in Java; kingship; Old Javanese epics; Sufism Javanese religiosity is syncretic, so the theory goes. As the most influential 20th-century scholar of Javanese religions, Clifford Geertz, stated, the 'religious tradition of Java, particularly of the peasantry, is a composite of Indian, Islamic, and indigenous Southeast Asian elements' (1973: 147). The historical overlaying of animistic traditions with first Hinduism and Buddhism from India, and later Islam, resulted in 'a balanced syncretism of myth and ritual in which Hindu gods and goddesses, Moslem prophets and saints, and local spirits and demons all found a proper place' (1973: 147). Van den Boogert (2015) demonstrates that the idea of syncretism has characterised European descriptions of religion in Java since at least the 17th century. But some of the questions it raises have not been addressed. A fundamental question is historical and anthropological at the same time. Javanese in the past, too, were endowed with powers of analysis. How did Javanese theorists deal with a complex religious situation