Islam was introduced by Sunni traders of the Shafi'i school as well as Sufi traders from the Indian subcontinent and southern Arabia as early as the 8th century CE. For the most part, Islam overlaid and mixed with existing cultural and religious influences that resulted in a distinct form of Islam (''pesantren''). Trade, Islamic missionary activity such as by the Wali Sanga and Chinese explorer Zheng He, and military campaigns by several sultanates helped accelerate the spread of Islam. By the end of the 16th century, it had supplanted Hinduism and Buddhism as the dominant religion of Java and Sumatra.