Islam’s success was primarily due to a process that historians term “localization,” by which Islamic teachings were often adapted in ways that avoided avoid major conflicts with existing attitudes and customs. Local heroes often became Islamic saints, and their graves were venerated places at which to worship. Some aspects of mystical Islam resembled pre-Islamic beliefs, notably on Java. Cultural practices like cockfighting and gambling continued, and spirit propitiation remained central in the lives of most Muslims, despite Islam’s condemnation of polytheism. Women never adopted the full face veil, and the custom of taking more than one wife was limited to wealthy elites. Law codes based on Islam usually made adjustments to fit local customs