The short answer is both. The Qur’an, the holy book of Islam, commands men to treat women with respect, enjoins the presumption of innocence and acknowledges a right to keep silent. It also mandates stoning, crucifixion and amputation. It sanctions slavery, so long as the slave isn’t Muslim. (Jews and Christians and many others in the seventh century also owned slaves.) I am indebted to British barrister Sadakat Kadri and his masterly book that explains shari’a and how it evolved over 12 centuries. Shari’a is “the way to salvation,” Islamic law derived from the Qur’an and the hadith (the deeds and sayings of the Prophet Muhammad).
In the beginning, Kadri writes, Islam’s penal code differed little from its contemporaries':
Corporal punishments were a feature of the age, while crucifixion owed its popularity in the Middle East to centuries of Persian and Roman practice— and among Muslims, at least in later years, it was intended to be a nonfatal means of humiliation rather than a method of execution. Torture, which was routine under the Christianized Roman law of Byzantium, found no place in the Qur’an…. Repentance was often reason enough to exclude punishment … The Qur’an urges victims of violence to accept compensation or exercise mercy instead of retaliating in kind as they had a right to do.