Did the Prophet (blessings and peace of Allah be upon him) issue rulings and instructions on the basis of his own opinion (ijtihad)?
Question

                I am very interested in learning Islam, so recently I began to read Saheeh al-Bukhaari. I noticed, in some hadiths, that the Prophet (blessings and peace of Allah be upon him) prescribed some things for us that were based on his own opinion, and were not revelation from Allah, may He be exalted. For example, I remember the hadith in which the Prophet (blessings and peace of Allah be upon him) said: “Were it not that it would be too difficult for my ummah, I would have commanded them to use the siwaak at the time of every prayer.” Narrated by al-Bukhaari (887) and Muslim (252). I hope that you can explain to me whether that is possible, because we know that all the teachings of the Messenger of Allah (blessings and peace of Allah be upon him) – whether it came in the form of instruction, permission, or prohibition – was based on inspiration from Allah.
Praise be to Allah.Firstly:
To start with, we appreciate your keenness to learn Islam and understand it. Knowledge is a light that illuminates the path and shows the way to know Allah, may He be glorified and exalted; it guides one to the truth that will save him on the Day of Resurrection.
We hope that all people will follow the same path that you are on, the path of reflecting and thinking, then ask about the questions and matters that come to mind. If every wise person verified what he reads or hears, he would ward off ignorance and misguidance from himself and others.
Secondly:
With regard to what you asked about, we may note the following:
The scholars divided the words and deeds of the Prophet (blessings and peace of Allah be upon him) into two categories:
The first category is words and deeds that are based on revelation and on the command of the Lord, may He be glorified and exalted. In this case, the Prophet (blessings and peace of Allah be upon him) was a trustworthy conveyor and transmitter of truth, enjoining what Allah enjoined and complying with what was revealed to him from his Lord, may He be glorified and exalted. This category forms the greater part of the words and deeds of the Prophet (blessings and peace of Allah be upon him).
The second category is words and deeds that were based on the Prophet’s own opinion and judgement; in this case the Prophet (blessings and peace of Allah be upon him) was not conveying or transmitting anything; rather he was working out a ruling on the basis of his opinion, as Allah gave him the authority to issue rulings and instructions and to judge between people, and Allah, may He be glorified and exalted, would approve of what he said or did, except in a few cases in which there was some error in the conclusion he reached. In that case, revelation would come down from Allah, may He be glorified and exalted, to correct it. Thus the Prophet (blessings and peace of Allah be upon him) remained infallible in all that he said and did.
When he was conveying what Allah had revealed to him, then infallibility and protection from error were there from the outset.
When he said or did something on the basis of his own opinion, then infallibility and protection from error came in the end.
Ash-Shaatibi (may Allah have mercy on him) said:
The hadiths are either pure revelation from Allah or something that the Messenger (blessings and peace of Allah be upon him)  said or did on the basis of his own opinion, on the basis of sound revelation from the Qur’an or Sunnah.
In either case, it is not possible for there to be any contradiction with the Book of Allah, for he (blessings and peace of Allah be upon him) did not speak from his own inclination; it was but a revelation revealed. If we say that it was possible for the Prophet (blessings and peace of Allah be upon him) to make a mistake, then we must affirm that any mistake would inevitably be corrected. It is more appropriate to say that the Prophet (blessings and peace of Allah be upon him) could not make a mistake and could not issue any ruling that contradicted what is in the Book of Allah.
End quote. Al-Muwaafaqaat (4/335).
Ash-Shawkaani (may Allah have mercy on him) said:
It was made permissible for our Prophet (blessings and peace of Allah be upon him) and other Prophets to speak on the basis of their own opinion (ijtihad). This is the view of the majority, and they quoted the following as evidence:
1.
Allah, may He be glorified, addressed His Prophet (blessings and peace of Allah be upon him) as He addressed His slaves, presenting likenesses to him and enjoining him [in the Qur’an] to reflect and learn lessons, for he is the greatest of those who reflect upon the verses and signs of Allah and who learn lessons.
With regard to the verses (interpretation of the meaning): “Nor does he speak from [his own] inclination. It is not but a revelation revealed” [an-Najm 53:3-4], what is referred to here is the Qur’an, because they (the disbelievers) said that he was being taught by a human being
2.
If it is permissible for others of his ummah to work out rulings on the basis of individual opinion (ijtihad) – according to scholarly consensus – even though the individual is vulnerable to error, then it is more appropriate that it be permissible for the one who is infallible and protected from error.
3.
This is clearly indicated by the verse in which Allah, may He be glorified and exalted, says (interpretation of the meaning): “May Allah pardon you, [O Muhammad]; why did you give them permission [to remain behind]?” [at-Tawbah 9:43]. Here Allah rebuked him for what he had done; if his action had been based on revelation, He would not have rebuked him.
4.
Another example is that which was soundly narrated from the Prophet (blessings and peace of Allah be upon him), that he said: “If I had known then what I know now, I would not have brought the hadiy (sacrificial animal) with me.” If the Prophet’s actions had been based on revelation, he would not have said that.
5.
And there are many similar examples, such as when Allah rebuked him (blessings and peace of Allah be upon him) for accepting ransom for the captives of Badr, in the verse ( interpretation of the meaning): “It is not for a prophet to have captives [of war] until he has thoroughly suppressed [the enemy] in the land” [al-Anfaal 8:67]; and Allah rebuked him (blessings and peace of Allah be upon him) in the verse (interpretation of the meaning): “And [remember, O Muhammad], when you said to the one on whom Allah bestowed favor and you bestowed favor, ‘Keep your wife and fear Allah’” [al-Ahzaab 33:37].
Quoting all the verses that prove this point would take up too much space; what we have quoted here is sufficient. Those who suggested otherwise did not produce sound evidence to support their argument.
End quote. Irshaad al-Fuhool (427-429).
Al-‘Allaamah al-Ameen ash-Shinqeeti (may Allah have mercy on him) said:
What appears to be the case with regard to this issue is that the Prophet (blessings and peace of Allah be upon him) may have done things in some cases when there was no revelation that specifically addressed the matter, such as when he gave permission to those who wanted to stay behind from the Tabook campaign before it became clear who was telling the truth and who was lying; and such as when he accepted the ransom for the captives of Badr; and such as when he told the people to refrain from pollinating the palm trees; and such as when he said, “If I had known then what I know now...”; and so on.
With regard to the meaning of the verse, “Nor does he speak from [his own] inclination” [an-Najm 53:3], there is nothing problematic in that, because the Prophet (blessings and peace of Allah be upon him) did not say anything on the basis of his own inclination or desire. And the words “It is not but a revelation revealed” [an-Najm 53:4], mean that everything that he conveyed from Allah was revelation from Allah; it is not based on inclination or desires, and it is not a lie or a fabrication. And Allah knows best.
End quote. Daf‘ Eehaam al-Ittiraab ‘an Aayaat al-Kitaab (p. 224). See also: Mudhakkirat Usool al-Fiqh (p. 60).
Thirdly:
Once it is clear that the Prophet (blessings and peace of Allah be upon him) sometimes said or did things based on his own opinion, then the revelation would confirm it, either by saying nothing about it or approving of it, and on rare occasions the revelation would correct it – once this is clear, then we will understand the meaning of the Prophet’s saying in many hadiths, “Were it not that it would be too difficult for my ummah, I would have commanded them …”, including the hadith of Abu Hurayrah (may Allah be pleased with him), that the Prophet (blessings and peace of Allah be upon him) said: “Were it not that it would be too difficult for the ummah – or for the people – I would have commanded them to use the siwaak at the time of every prayer.” Narrated by al-Bukhaari (887) and Muslim (252).
Imam an-Nawawi (may Allah have mercy on him) said:
This indicates that it is possible for the Prophet (blessings and peace of Allah be upon him) to speak or act on the basis of his own opinion in matters concerning which there was no revelation from Allah, may He be exalted. This is the view of most of the fuqaha’ and scholars of usool, and it is the correct and preferred view. End quote.
Sharh Muslim (3/144).
Abu’l-Waleed al-Baaji (may Allah have mercy on him) said:
His refraining from instructing them to do something because of possible hardship – i.e., his saying that were it not that it would be too difficult, he would have instructed them to do it – implies that the Prophet (blessings and peace of Allah be upon him) had the authority to issue rulings and make them binding on the basis of his own opinion, otherwise his compassion for his ummah would not have prevented him from making the siwaak obligatory for them because of fear of hardship.
End quote. Al-Muntaqa Sharh al-Muwatta’ (1/130).
However,  there may be another way to understand this hadith, in such a way that we do not need to affirm the possibility that the Prophet (blessings and peace of Allah be upon him) might speak or act on the basis of his own opinion.
Al-Haafiz Ibn Hajar (may Allah have mercy on him) said, when explaining what may be learned from this hadith:
This highlights the possibility that the Prophet (blessings and peace of Allah be upon him) might speak or act on the basis of his own opinion concerning matters regarding which no revelation had come down to him, because he cited fear of hardship as the reason for not enjoining (use of the siwaak). If the ruling was dependent upon there being a text of revelation, then the reason for the siwaak not being obligatory would be that there was no text of revelation concerning it, and not the fear of hardship.
Ibn Daqeeq al-‘Eed said: This is subject to further discussion.
And it is as he said. That is because it is possible that he (blessings and peace of Allah be upon him) was telling them that the reason why there was no revelation (concerning this matter) is that it would cause hardship, so what is meant by his words “I would have commanded them” is: I would have conveyed from Allah that it is obligatory.
End quote. Fath al-Baari (2/376).
And Allah knows best.