The
Majapahit Empire, a Hindu kingdom based in East Java, enjoyed unrivalled success from 1292 to 1389, boasting at least partial control over a vast area covering Java, Bali, Sumatra, Borneo, Sulawesi, Lombok and Timor. This was the first time the major islands of the Indonesian archipelago had been united under one command. As well as economic prosperity, the Majapahit empire also saw the first flowering of Indonesian culture, in particular certain courtly traditions still extant. However, the arrival of Islam on Java and a massive revolt in the north of the island eventually left the empire weak and in disarray, although it managed to survive for over a hundred years longer on its new home in Bali.
Islam first gained a toehold in the archipelago as early as the fifth century AD, during the rule of the Buddhist Srivijaya Empire. Merchants from Gujarat in India who called in at Aceh in northern Sumatra were the first to bring the message of Mohammed, followed soon after by traders from Arabia. From Sumatra, Islam spread eastwards, first along the coast and then into the interior of Java and the rest of Indonesia (Bali, Flores and Irian Jaya excepted), where it syncretized with the Hindu, Buddhist and animist faiths that were already practised throughout the archipelago. The first Islamic kingdoms in the archipelago emerged on Java, where small coastal sultanates grew in the vacuum left by the Majapahit.