At first, Sufism only meant making Islam more personal and internal. Some say it first came from constantly reciting the Qur'an, meditating, and through experience. Others believe that Sufism is trying to live as the Islamic prophet Muhammad did, to be closer to God. This is how the Prophet taught his disciples. Additionally, the Muslim conquests had brought large numbers of Christian monks and hermits, especially in Syria and Egypt, under Muslim rule. They believed in a deeply spiritual and mystical (even 'Platonic') way of life and many of their ways became part of early Sufism.
Some of these teachings were summarized in texts (in Arabic initially). Important contributions in writing are attributed to
Uwais al-Qarni, Harrm bin Hian, Hasan Basri and Sayid ibn al-Mussib, who are regarded as among the first Sufis in the earliest generations of Islam. Harith al-Muhasibi was the first one to write about moral psychology. Rabia Basri was a Sufi known for her love and passion for God, expressed through her poetry.
Bayazid Bastami was among the first theorists of Sufism.
Sufism already had a long history when some teachers began to set up formal schools or orders (Tarika or Tariqah) in the early Middle Ages. Almost all existing Sufi orders today trace their roots and chain of transmission (silsila) back to Muhammad, via one of these orders.