Al-Ghazali is regarded as the individual who linked the two together. After going through a severe personal and intellectual crisis in 1095, he quit his prestigious position as a teacher in Baghdad and opted for the ascetic lifestyle of a Sufi. His magnum opus, Ihya’ Ulum al-Din (The Revival of the Sciences of Religion), was a synthesis of mysticism and Islamic law (Shari’ah), which transformed the Sufi tradition from a deviant element into a mainstream part of Islamic tradition.