In Islam, sunnah, also spelled sunna (سنة), are the traditions and practices of the Islamic prophet Muhammad that constitute a model for Muslims to follow. The sunnah is what all the Muslims of Muhammad's time evidently saw and followed and passed on to the next generations. According to classical Islamic theories, the sunnah are documented by hadith (the verbally transmitted record of the teachings, deeds and sayings, silent permissions or disapprovals of Muhammad), and alongside the Quran (the book of Islam) are the divine revelation (Wahy) delivered through Muhammad that make up the primary sources of Islamic law and belief/theology. Differing from Sunni classical Islamic theories are those of Shia Muslims, who hold that the Twelve Imams interpret the sunnah, and Sufi who hold that Muhammad transmitted the values of sunnah "through a series of Sufi teachers."
According to Muslim belief, Muhammad was the best exemplar for Muslims, and several verses in the Quran declare his conduct exemplary, and enjoin his followers to obey him. Sunnah provides a basis not only for major laws and rituals in Islam like how to pray salat, but for "even the most mundane activities", such as the order in which to cut fingernails or the proper length of a beard.
In the pre-Islamic period, sunnah was used to mean "manner of acting", whether good or bad. During the early Islamic period, the term referred to any good precedent set by people of the past, including both Muhammad, and his companions. In addition, the sunnah of Muhammad was not necessarily associated with hadith.
The classical meaning that now prevails was introduced later in the late second century of Islam, when under the influence of the scholar Al-Shafi‘i, Muhammad's example as recorded in hadith was given priority over all other precedents set by other authorities. The term al-sunnah then eventually came to be viewed as synonymous with the sunnah of Muhammad, based on hadith reports. Recording the sunnah was also an Arabian tradition and once they converted to Islam, Arabians brought this custom to their religion.