Sunnah (sunnah, (also sunna) سنة, Arabic: [sunna], plural سنن sunan [sunan]) is the body of traditional social and legal custom and practice of the Islamic community, based on the verbally transmitted record of the teachings, deeds and sayings, silent permissions (or disapprovals) of the Islamic prophet Muhammad, as well as various reports about Muhammad's companions. The Quran (the holy book of Islam) and the sunnah make up the two primary sources of Islamic theology and law. The sunnah is also defined as "a path, a way, a manner of life"; "all the traditions and practices" of the Islamic prophet that "have become models to be followed" by Muslims.
In the pre-Islamic period, the word sunnah was used with the meaning "manner of acting", whether good or bad. During the early Islamic period, the term came to refer to any good precedent set by people of the past, including the Islamic prophet Muhammad. Under the influence of Al-Shafi‘i, who argued for priority of Muhammad's example as recorded in hadith over precedents set by other authorities, the term al-sunnah eventually came to be viewed as synonymous with the sunnah of Muhammad.
The sunnah of Muhammad includes his specific words (Sunnah Qawliyyah), habits, practices (Sunnah Fiiliyyah), and silent approvals (Sunnah Taqririyyah). According to Muslim belief, Muhammad was the best exemplar for Muslims, and his practices are to be adhered to in fulfilling the divine injunctions, carrying out religious rites, and moulding life in accord with the will of God. Instituting these practices was, as the Quran states, a part of Muhammad's responsibility as a messenger of God. Recording the sunnah was an Arabian tradition and, once people converted to Islam, they brought this custom to their religion.
Sunni Muslims are also referred to as Ahl as-Sunnah wa'l-Jamā'ah ("people of the tradition and the community (of Muhammad)") or Ahl as-Sunnah for short. Some early Sunnî Muslim scholars (such as Abu Hanifa, al-Humaydî, Ibn Abî `Âsim, Abû Dâwûd, and Abû Nasr al-Marwazî) reportedly used the term "the Sunnah" narrowly to refer to Sunnî Doctrine as opposed to the creeds of Shia and other non-Sunni sects.
Early schools of Islamic jurisprudence also had a more flexible definition of Sunnah than was used later, that being "acceptable norms" or "custom", and was not limited to “traditions traced back to the Prophet Muhammad himself” (sunna al-nabawiyyah). It included examples of the Prophet’s Companions, the rulings of the Caliphs, and practices that “had gained general acceptance among the jurists of that school”. Evidence of the use of other “sunnas” at this time is found in the hadith comment made about a report on the difference in the number of lashes used to punish alcohol consumption (Muhammad and Abu Bakr ordered 40 lashes, Umar 80) — “All this is sunna”; and also on Umar’s deathbed instructions on where Muslims should seek guidance: from the Qur’an, the early Muslims (muhajirun) who emigrated to Medina with Muhammad, the Medina residents who welcomed and supported the muhajirun (the ansar), the people of the desert, and the protected communities of Jews and Christians (ahl al-dhimma).
It was Abū ʿAbdullāh Muhammad ibn Idrīs al-Shāfiʿī (150-204 AH), known as al-Shafi'i, who argued against this practice, emphasizing the final authority of a hadith of Muhammad, so that even the Qur'an was "to be interpreted in the light of traditions (i.e. hadith), and not vice versa." While traditionally the Quran is considered above the Sunna in authority, Al-Shafi'i "forcefully argued" that the sunna stands "on equal footing with the Quran", (according to scholar Daniel Brown) for (as Al-Shafi'i put it) “the command of the Prophet is the command of God.” 
His success was such that later writers “hardly ever thought of sunna as comprising anything but that of the Prophet”.
In the 1960s, Fazlur Rahman Malik, an Islamic modernist and former head of Pakistan's Central Institute for Islamic Research, advanced another idea for how the (Prophetic) Sunnah should be understood: as the normative example of the Prophet, but not "filled with absolutely specific content". Rather it should be "a general umbrella concept" that could and should evolve as a "living and on-going process". He argued that Muhammad had come as a "moral reformer" and not a "pan-legit", and that the community of his followers would agree on the specifics of the sunna. If Western and Muslim scholars found that the isnad (chain of transmitters) and content of ahadith had been tampered by someone trying to prove the Muhammad had made a specific statement, this did not mean they were fraudulent. "Hadith verbally speaking does not go back to the Prophet, its spirit certainly does". If hadith changed from the early schools to the time of al-Shafi'i, and then through tampering from al-Shafi'i to the collections of ahadith of al-Bukhari and al-Muslim's, they actually formed a kind of ijma (consensus or agreement of the Muslim scholars). According to Rahman they were "materially identical" to ijma.
According to Javed Ahmad Ghamidi, another Modernist, just as the Qur’ān has been "received by the ummah" (Muslim community) through the consensus of the Prophet’s Companions and through their perpetual recitation, so the Sunnah has been passed down not through books of hadith but through the continuous practice of it by the Muslim community (which indicates consensus). Consequently, Ghadiki sees Sunna as equally authentic to the Quran and as more limited than orthodox hadith sunnah. He includes worship rituals like salat (ritual prayer), zakat (ritual tithing), hajj (pilgrimage to Mecca), sawm (dawn to dusk fasting during Ramadan), as well as customs such as circumcision and the shaving of pubic hair, but excludes most other hadith sunnah commands.
According to the view of some Sufi Muslims who incorporate both the outer and inner reality of Muhammad, the deeper and true sunnah are the noble characteristics and inner state of Muhammad. To them Muhammad's attitude, his piety, the quality of his character constitute the truer and deeper aspect of what it means by sunnah in Islam, rather than the external aspects alone. They argue that the external customs of Muhammad loses its meaning without the inner attitude and also many Hadiths are simply custom of the Arabs, not something that is unique to Muhammad. and Khuluqin Azim or 'Exalted Character' in the Quran, real sunnah cannot be upheld.
In addition to being "the way" of Islam or the traditional social and legal custom and practice of the Islamic community, sunnah is often used as a synonym for “mustahabb (encouraged)” rather than wajib/fard (obligatory) regarding some commendable action (usually the saying of a prayer). Mustahabb/sunnah deeds are those that earn a reward in the afterlife for those who do them, but will not bring any punishment for those who neglect them. According to Islam Q&A website of Muhammed Salih Al-Munajjid this second definition of sunna is used by "scholars of usool and fiqh" for acts that are “mustahabb (encouraged)”, in the five categories of Sharia rulings (known as “the five decisions” or five akram).
Salât as-Sunnah (Arabic: صلاة السنة) are optional prayers performed in addition to the five daily compulsory Salât prayers. Some are done at the same time as the compulsory prayers, some are done only at certain times, e.g. late at night, and some are only done for specific occasions such as during a drought. They are called Sunnah because how they are practiced is based on stories, narrations, interpretations, traditions of Muhammad by his companions. "Examples include al-Sunan al-Rawaatib" (Sunnah prayers which Muhammad did regularly), "Salaat al-Duhaa and so on." Sunnah Mu’akkadah are actions Muhammad "never omitted to do, whether he was travelling or not," such as the prayers Sunnat al-Fajr and al-Witr.
The word “Sunna” appears several times in the Qur’an, but there is no specif mention of sunnat al-rasool (sunna of the messenger) or sunnat al-nabi or sunna al-nabawiyyah (sunna of the prophet), i.e. the way/practice of Prophet Muhammad. (There are several verses calling on Muslims to obey Muhammad—see below.) Four verses (8.38, 15.13, 18.55) use the expression “sunnat al-awwalin”, which is thought to mean “the way or practice of the ancients.” It is described as something "that has passed away" or prevented unbelievers from accepting God. “Sunnat Allah” (the “way of God”) appears eight times in five verses. In addition, verse 17.77 talks of both the way of other, earlier Muslim messengers (Ibrahim, Musa, etc.), and of "our way", i.e. God's way.
This indicates to some scholars (such as Javed Ahmad Ghamidi) that sunnah predates both the Quran and Muhammad, and is actually the tradition of the prophets of God, specifically the tradition of Abraham. Christians, Jews and the Arab descendants of Ishmael, the Arabized Arabs or Ishmaelites, when Muhammad reinstituted this practice as an integral part of Islam.
Among the Quranic verses quoted as demonstrating the importance of hadith/sunnah to Muslims are
Which appears in several verses: 3:32, 5:92, 24:54, 64:12
"A similar (favour have ye already received) in that We have sent among you a Messenger of your own, rehearsing to you Our Signs, and sanctifying you, and instructing you in Scripture and Wisdom, and in new knowledge.
"Ye have indeed in the Messenger of Allah a beautiful pattern (of conduct) for any one whose hope is in Allah and the Final Day, and who engages much in the Praise of Allah."
The teachings of "wisdom" have been declared to be a function of Muhammad along with the teachings of the scripture. Several Quranic verses mention "wisdom" (hikmah) coupled with "scripture" or "the book" (i.e. the Quran), and it is thought that in this context, "wisdom" means the sunnah.
Surah 4 (An-Nisa), ayah 113 states: "For Allah hath sent down to thee the Book and wisdom and taught thee what thou Knewest not (before): And great is the Grace of Allah unto thee."
Surah 2 (Al-Baqara), ayah 231: "...but remember Allah's grace upon you and that which He hath revealed unto you of the Scripture and of wisdom, whereby He doth exhort you."
Surah 33 (Al-Ahzab), ayah 34: "And bear in mind which is recited in your houses of the revelations of God and of wisdom".
Therefore, along with divine revelation the sunnah was directly taught by God. Modern Sunni scholars are beginning to examine both the sira and the hadith in order to justify modifications to jurisprudence (fiqh). The sunnah, in one form or another, would retain its central role in providing a moral example and ethical guidance.
For Muslims the imitation of Muhammad helps one to know and be loved by God: one lives in constant remembrance of God.
In addition there are a number of verses in the Quran where "to understand the context, as well as the meaning", Muslims need to refer to the record of the life and example of the Prophet.
It is thought that verses 16:44 and 64 indicate that Muhammed's mission "is not merely that of a deliveryman who simply delivers the revelation from Allah to us, Rather, he has been entrusted with the most important task of explaining and illustrating" the Quran.
And We have not sent down the Book (the Quran) to you (O Muhammad), except that you may explain clearly unto them those things in which they differ, and (as) a guidance and a mercy for a folk who believe. [Quran 16:64]
For example, while the Quran presents the general principles of praying, fasting, paying zakat, or making pilgrimage, they are presented "without the illustration found in Hadith, for these acts of worship remain as abstract imperatives in the Qur’an".
There are three types of sunnah:
In the terminology of fiqh (Islamic jurisprudence), sunnah denotes whatever though not obligatory, is "firmly established (thabata) as called for (matlub)" in Islam "on the basis of a legal proof (dalîl shar`î).
According to scholar Gibril Fouad Haddad, the "sciences of the Sunnah" (`ulûm as-Sunna) refer to:
the biography of the Prophet (as-sîra), the chronicle of his battles (al-maghâzî), his everyday sayings and acts or "ways" (sunan), his personal and moral qualities (ash-shamâ'il), and the host of the ancillary hadîth sciences such as the circumstances of occurrence (asbâb al-wurûd), knowledge of the abrogating and abrogated hadîth, difficult words (gharîb al-hadîth), narrator criticism (al-jarh wat-ta`dîl), narrator biographies (al-rijâl), etc., as discussed in great detail in the authoritative books of al-Khatîb al-Baghdâdî.
Unlike the Quran, the Sunnah was not recorded and written during the Prophet's lifetime, but was systematically collected and documented beginning at least two centuries after the death of Muhammad (i.e. the ninth century of the Christian era).
According to scholar Khaled Abou El Fadl, "the late documentation of the Sunna meant that many of the reports attributed to the Prophet are apocryphal or at least are of dubious historical authenticity. In fact, one of the most complex disciplines in Islamic jurisprudence is one which attempts to differentiate between authentic and inauthentic traditions."
Originally Muslim lawyers "felt no obligation" to provide documentation of hadith when arguing their case. Over the course of the second century under the influence of Imam Al-Shafi‘i (the founder of the Shafi'i school of jurisprudence), this changed so that now there is "rather broad agreement that Hadith must be the basis for authentication of any Sunnah," and the "particular textual source for Sunnah is Hadith", according to M.O. Farooq.
In the context of biographical records of Muhammad, sunnah often stands synonymous with hadith since most of the personality traits of Muhammad are known from descriptions of him, his sayings and his actions after becoming a prophet at the age of forty. Sunnah, which consists not only of sayings, but of what Muhammad believed, implied, or tacitly approved, was recorded by his companions in hadith. Allegiance to the tribal sunnah had been partially replaced by submission to a new universal authority and the sense of brotherhood among Muslims.
Early Sunni scholars often considered sunnah equivalent to the biography of Muhammed (sira). As the hadith came to be better documented and the scholars who validated them gained prestige, the sunnah came often to be known mostly through the hadith, especially as variant or fictional biographies of Muhammad spread.
Classical Islam often equates the sunnah with the hadith. Scholars who studied the narrations according to their context (matn) as well as their transmission (isnad) in order to discriminate between them were influential in the development of early Muslim philosophy. In the context of sharia, Malik ibn Anas and the Hanafi scholars are assumed to have differentiated between the two: for example Malik is said to have rejected some traditions that reached him because, according to him, they were against the "established practice of the people of Medina".
Shia Islam does not use the Kutub al-Sittah (six major hadith collections) followed by Sunni Islam, therefore the Sunnah of Shia Islam and the Sunnah of Sunni Islam refer to different collections of religious canonical literature.
The primary collections of Sunnah of Shia Islam were written by three authors known as the 'Three Muhammads', and they are: