The Demak Sultanate. The Demak Sultanate (c. 1475-1554) was the first Muslim kingdom of Java and the agent of the island's Islamization. Founded on Java's north coast - traditionally by Raden Patah, a prince of mixed Chinese-Javanese or Majapahit descent, breaking from the declining Hindu-Buddhist empire of Majapahit - Demak grew rich on the rice and timber trade and on the fleets of the new Muslim merchant networks linking Java to Malacca and beyond.
Demak's early sultans expanded aggressively: they took the Hindu ports of the north coast, raided Majapahit's heartland (the traditional date for Majapahit's final fall is 1527), and under Sultan Trenggana (r. 1504-1546) projected power across Java - against the Portuguese-backed Sundanese kingdom of Pajajaran in the west and into the eastern salient - while Demak's navy attacked Portuguese Malacca itself in 1513.
The dynasty's memory is inseparable from the Wali Songo, the 'Nine Saints' revered as Java's apostles of Islam - preacher-traders like Sunan Ampel, Sunan Giri and Sunan Kudus, who founded mosques and pesantren schools and, in Javanese tradition, wove Islam into Javanese culture (wayang, gamelan, and the five-times prayer fitted to the gong cycle). Demak's Great Mosque, with its vast tiered roof and the mysterious saka guru pillars - one said to be of wood chips pressed by a saint - remains Java's holiest mosque.
Trenggana's assassination in 1546 threw Demak into succession wars, and power passed to Pajang and then Mataram; the last Demak pretender was extinguished by 1554. But the sultanate had done its work: Java was Muslim, and the Wali Songo tradition it sponsored still defines Javanese Islam.