the companions of the prophet (peace and blessings be upon him) used to take the ruling on different matters in their lives from the qur’an, which they learned from the prophet (peace and blessings be upon him). in many instances, the verses of the qur’an treated a subject in a general manner, without any specific condition and sometimes, the verses would come as an absolute ruling, without any precondition or limitation in terms of time, place, and so on.
as an example of what came in a general way in the qur’an is prayer. the qur’an does not mention how many rak`ahs we should perform, or how to move physically during prayer, or the time for prayer. similarly, the qur’an does not mention the minimum amount of money to have before giving zakah or the conditions by which to pay it. many of our acts of worship cannot be performed without referring to the explanations related to the regulations, pillars, and conditions of nullification. thus, it is necessary to return to the prophet (peace and blessings be upon him) to know the rules in a comprehensive and clear manner.
many times, the companions faced incidents in which the qur’an had no ruling, then there was a need to return to the prophet (peace and blessings be upon him) to know the ruling for such matters. it was the prophet who was ordered by allah almighty to teach humanity, and it was the prophet who was the most knowledgeable of mankind about that which allah expects from us.
allah has told us about the duty of the prophet (peace and blessings be upon him) with respect to the qur’an. allah said:
[and we have sent down unto thee (also) the reminder; that thou mayest explain clearly to men what is sent for them, and that they may give thought.] (an-nahl 16:44)
allah also made it clear to us that the duty of the prophet (peace and blessings be upon him) was to clarify the truth to people when there was a dispute:
[and we have revealed the scripture unto thee only that thou mayst explain unto them that wherein they differ, and (as) a guidance and a mercy for people who believe.] (an-nahl 16:64)
we are obligated to follow any ruling by him in any dispute:
[but no, by your lord! (o muhammad) they cannot be believers until they make you judge in all disputes among them, and find in their souls no resistance against your decisions, but accept them with the fullest submission.] (an-nisaa’ 4:65)
allah also mentioned that the prophet (peace and blessings be upon him) was given the qur’an and wisdom to teach people the regulations of their religion:
[allah did confer a great favour on the believers when he sent to them a messenger from among themselves, rehearsing unto them the signs of allah, sanctifying them, and instructing them in scripture and wisdom, while, before that, they had been in manifest error.] (aal `imran 3:164)
regarding the last verse, most scholars have said that the wisdom mentioned in it means another thing besides the qur’an. it refers to the knowledge which allah has given the prophet on matters and regulations that the rest of humanity cannot attain. imam ash-shafi`i said:
allah almighty has mentioned the scripture which is the qur’an, and he mentioned wisdom and i have learned from the people of knowledge that the wisdom here is the sunnah of the prophet (peace and blessings be upon him). it is out of the mercy of allah that he has guided us to the way through which we can practice what is in the qur’an.
to clarify the concept of sunnah and our obligation to follow it, allah said:
[those who follow the messenger, the unlettered prophet, whom they find mentioned in their own (scriptures),—in the torah and the gospel;—he commands them what is right and forbids them what is evil; he allows them as lawful what is good (and pure) and prohibits them from what is bad (and impure); he releases them from their heavy burdens and from the yokes that have been upon them. so it is those who believe in him, honour him, help him, and follow the light which is sent down with him,- it is they who will prosper.] (al-a`raf 7: 157)
because this teaching is mentioned in general in this verse, then it includes both the rules in the qur’an and sunnah.
a very strong proof of the obligation to follow the sunnah can be found in the following verse:
[and whatsoever the messenger gives you, take it, and whatsoever he forbids you, abstain (from it), and fear allah. verily, allah is severe in punishment.] (al-hashr 59:7)
allah has also made obedience to the prophet (peace and blessings be upon him) a complement with obedience to him:
[and obey allah and the messenger, that ye may obtain mercy.] (aal `imran 3:132)
we are commanded by almighty allah to answer any order by the prophet (peace and blessings be upon him):
[o ye who believe! give your response to allah and his messenger, when he calleth you to that which will give you life.] (al-anfal 8:24)
allah made the obedience of the prophet (peace and blessings be upon him) a manifestation of obedience to him, and following the prophet (peace and blessings be upon him) is an indication of the love of allah:
[he who obeys the messenger, obeys allah.] (an-nisaa’ 4:80)
[say: if ye do love allah, follow me: allah will love you and forgive you your sins.] (aal `imran 3:31)
and he almighty warned us about not following the instructions of the prophet (peace and blessings be upon him):
[then let those beware who withstand the messenger’s order, lest some trial befall them, or a grievous penalty be inflicted on them.] (an-nur 24:63)
it is never allowed by allah for a believer to disobey the prophet’s order:
[it is not fitting for a believer, man or woman, when a matter has been decided by allah and his messenger to have any option about their decision: if any one disobeys allah and his messenger, he is indeed on a clearly wrong path.] (al-ahzab 33:36)
further, not following the rulings of the prophet (peace and blessings be upon him) when a dispute occurs is a sign of hypocrisy, allah almighty says:
[they say, we believe in allah and in the messenger, and we obey; but even after that, some of them turn away; they are not (really) believers. when they are summoned to allah and his messenger, in order that he may judge among them, behold some of them decline (to come). but if the right is on their side, they come to him with all submission. is it that there is a disease in their hearts? or do they doubt, or are they in fear, that allah and his messenger will deal unjustly with them? nay, it is they themselves who do wrong. the answer of the believers, when summoned to allah and his messenger, in order that he may judge among them, is no other than this: they say, “we hear and we obey”; and such are the successful (who will live forever in paradise).] (qur'an - surat - an-nur 24:47-51)