Are all the branches of faith obligatory?
Question

Are all the branches of faith obligatory, in the sense that if someone does not do them he will fall into sin?
Praise be to Allah.Levels and branches of faith
It was narrated that Abu Hurayrah (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) said: “Faith has seventy-odd – or sixty-odd – branches, the best of which is saying La ilaha ill-Allah (there is no god worthy of worship except Allah), and the least of which is removing something harmful from the road, and modesty is a branch of faith.” (Narrated by al-Bukhari, 9 and Muslim, 35).
This hadith states that faith has many branches and characteristics, but it does not state the ruling on each branch; rather it indicates that they are of various levels of importance.
Are all the branches of faith obligatory?
Al-Hafiz Ibn Hajar (may Allah have mercy on him) said:
In the report of Muslim with the addition, it says: “the highest of which is saying La ilaha ill-Allah (there is no god worthy of worship except Allah), and the least of which is removing something harmful from the road.” This indicates that their levels of importance vary. (End quote from Fath al-Bari, 1/53).
The fact that they are listed under the heading of faith does not mean that they are all obligatory, because when the word faith (iman) appears on its own, it includes all good and righteous deeds, both obligatory and recommended.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
When the word faith (iman) appears on its own in the Qur’an and Sunnah, what is meant is that which is meant by the words righteousness, piety and religion, as noted above. The Prophet (blessings and peace of Allah be upon him) stated that “Faith has seventy-odd branches, the best of which is saying La ilaha ill-Allah (there is no god worthy of worship except Allah), and the least of which is removing something harmful from the road.” Thus everything that Allah loves is included under the heading of faith. (End quote from Majmu‘ al-Fatawa, 7/179).
Allah, may He be exalted, has also called prayer faith (iman), as He says (interpretation of the meaning):
{And never would Allah have caused you to lose your faith [i.e., your previous prayers]. Indeed Allah is, to the people, Kind and Merciful}
[al-Baqarah 2:143].
It was narrated that Zuhayr said: Abu Is-haq told us, on the authority of al-Bara’ ibn ‘Azib, that when the Prophet (blessings and peace of Allah be upon him) first came to Madinah, he stayed with the descendants of his grandfathers – or his maternal uncles – among the Ansar, and he prayed facing towards Bayt al-Maqdis (Jerusalem) for sixteen or seventeen months, but he wished that his qiblah could be facing towards the Ka‘bah. The first prayer that he offered facing towards the Ka‘bah was ‘Asr prayer, and some people prayed with him. Then one of the men who had prayed with him went out and passed by some people in a mosque who were bowing, so he said: I bear witness by Allah that I have just prayed with the Messenger of Allah (blessings and peace of Allah be upon him) facing towards Makkah. So they turned around, as they were, to face towards the Ka‘bah. It had pleased the Jews and the People of the Book when he used to pray facing towards Bayt al-Maqdis, but when he turned to face towards the Ka‘bah, they disapproved of that.
Zuhayr said: Abu Is-haq told us, on the authority of al-Bara’ in this hadith that some men had died or been killed when they were still praying towards the [first] qiblah, before it was changed, and we did not know what to say about them [and their prayers]. Then Allah, may He be exalted, revealed the words:
{And never would Allah have caused you to lose your faith [i.e., your previous prayers]}
[al-Baqarah 2:143].
(Narrated by al-Bukhari, 40).
Ibn Rajab (may Allah have mercy on him) said:
‘Ubaydullah ibn Musa said: This hadith tells you that prayer is part of faith, and this is what al-Bukhari stated in his chapter heading here, and quoted the hadith of al-Bara’ under this heading for that reason.
Similarly, Ibn ‘Uyaynah and other scholars quoted this verse as evidence that prayer is part of faith. Those who narrated from him that this verse is to be interpreted as referring to prayer in the direction of Jerusalem include Ibn ‘Abbas, according to al-‘Awfi’s report from him, Sa‘id ibn al-Musayyab, Ibn Zayd, as-Suddi and others.
Qatadah and ar-Rabi‘ ibn Anas said: This verse was revealed because some of the Muslims said: What about our deeds that we did when facing towards our first qiblah?
This indicates that what is meant by faith here is prayer, because prayer is the only deed that requires one to face towards the qiblah.
Most of the commentators did not mention any difference of opinion regarding that and regarding the fact that what is meant by faith here is prayer, for prayer is the sign of faith and the greatest physical manifestation thereof. (End quote from Fath al-Bari, 1/190).
Some prayers are obligatory and some are supererogatory.
Hence those scholars who tried to list all the branches of faith included prayer, both obligatory and supererogatory.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
Faith is composed of fundamental elements without which it cannot be complete, and others which are obligatory and if a person does not do these things, his faith is lacking to the extent that he deserves punishment. Other elements are recommended, meaning that if they are lacking, the individual will miss out on attaining a high degree of faith. Thus a person may fall into one of three caregories: wronging himself, moderate, or foremost in doing good deeds. (End quote from Majmu‘ al-Fatawa, 7/637).
Moreover, the revelation did not mention the names of all of these branches. This is by way of motivating people to strive hard in doing acts of worship in general, by persisting in doing obligatory acts, and striving hard and competing to do recommended acts.
Abu’l-‘Abbas al-Qurtubi (may Allah have mercy on him) said:
What the hadith means is that the deeds that are prescribed in Islam are called faith on the basis of what we have mentioned above, in that they are limited to that number, but the religious texts did not specify that number for us or explain it in detail.
One of the later scholars put unnecessary effort into trying to list these branches of faith, so he examined the righteous deeds prescribed by Islam and counted them, until – according to his claim – he reached that number. But that number is not correct, because it is possible to add to what he listed or to subtract from it, by highlighting the overlap between some of them.
The correct view is the conclusion reached by Abu Sulayman al-Khattabi and others, which is that this number is something that is known only to Allah, may He be exalted, and to His Messenger (blessings and peace of Allah be upon him), and you find it explained in details in Islamic teachings, but the religious texts did not give headings to these branches of faith or tell us about their number or how they are to be categorized. However, the fact that we do not know the details of what is enjoined upon us in the teachings of Islam does not hinder us, because all of that is discussed and explained in general terms in Islam. Therefore whatever the religious texts enjoin us to do, we do it, and whatever they forbid us to do, we refrain from it, even though we do not know the total number of that. And Allah, may He be exalted, knows best. (End quote from al-Mufhim, 1/217).
Are the branches of faith limited to the number mentioned in the hadith only?
There could be some confusion resulting from the fact that if you tried to find out the number of good deeds, whether they are obligatory or recommended, the number would be much greater than what is mentioned in the hadith. The scholars have responded to this confusion in several ways, which were mentioned by Ibn Rajab (may Allah have mercy on him) when he said:
In the view of the Sunni scholars of hadith, each righteous deed and act of obedience comes under the heading of faith, whether it is a physical action, a deed of the heart or words, and obligatory and supererogatory deeds are the same in that regard. This is the view of the vast majority of scholars, and as that is the case, the number is not limited to seventy-odd; rather it is much greater than that and is in fact unlimited.
It was said: we may respond to this [confusion] in several ways:
Firstly: it may be said that when the Prophet (blessings and peace of Allah be upon him) mentioned the number of branches of faith, they were limited to that number, then others were added after that, until at the end of the Prophet’s life, the number of branches of faith was completed.
However, there are some reservations about that.
Secondly: the branches of faith are limited to seventy-odd types, but each type may be a heading for many things, and some of them may be unlimited. This is more likely to be correct, even though learning about all of them is difficult, if not impossible.
Thirdly: mentioning seventy is by way of indicating that the number is great, and is not by way of limiting it to that number, as Allah, may He be exalted, says (interpretation of the meaning):
{If you should ask forgiveness for them seventy times – never will Allah forgive them}
[at-Tawbah 9:80].
What is meant in this verse is to signify a great number, without limiting it to the number mentioned. Mentioning seventy-odd branches gives that impression, so it is as if he was saying that they are more than seventy, which implies that the number is great and many times more than what is mentioned. This was stated by the earlier hadith scholars, but there are some reservations about that.
Fourthly: these seventy-odd branches are the best and most sublime of the branches of faith, and they are the most necessary. This was stated by Ibn Hamid, among our companions. (End quote from Fath al-Bari, 1/30-31).
And Allah knows best.