 According to Ibn Khaldun Sufism was already practiced by the Sahaba, but with the spread of material tendencies, the term Sufi was just applied to those who emphasize the spiritual practice of Islam.Towards the end of the first millennium CE, a number of manuals began to be written summarizing the doctrines of Sufism and describing some typical Sufi practices.Two of the most notable are "Kashf al-Mahjûb" (Revelation of the Veiled) of Hujwiri, and "Risâla" (The Message) of Al-Qushayri.