It should be clear that growing the beard is neither one of the conditions for the validity of Prayer nor one of the integrals of faith . Muslim scholars differed whether growing the beard is an obligation or a Sunnah. There is nothing in the sources of Shari`ah telling that it is not allowed to pray behind someone who shaves his beard, and this is the authentic view of the Hanafi school of jurisprudence.
Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada , states, It is not correct to say that we are not allowed to pray behind someone who shaves his beard: This is neither the authentic view of the Hanafischool of jurisprudence nor the preferred view of the majority of scholars and jurists.
Such a view is contrary to sound reasoning in fiqh, even as it is contradicted by the sound practice of As-Salaf As-Salih (Arabic for “the Pious Forefathers”). Let me explain this point further:
Growing a beard is considered one of the recommended acts in Islam: While some of the scholars consider it as a great Sunnah, others consider it as obligatory. However, every objective scholar of Islam would agree that growing beard is not at all one of the integrals of faith; and no one can say that a person’s faith is incomplete without it. Prophet Muhammad (peace and blessings be upon him) said, ” Growbeards and trim moustaches in order to set yourself apart from the Magians.” So, it is reasonable to say that his intent was to identify Muslims in case of a confrontation.
As for the issue of validity of Prayer, there is no mention anywhere in the sources that a Muslim’s Prayer is rendered invalid because of his failure to grow a beard. How can anyone say that a Muslim’s Prayer is rendered invalid because of his failure to carry out any of the duties of faith in entirety? The Prophet said, “Whatever I have commanded you to do, do it to the best of your ability.” It would be absurd for anyone to rule that the Prayer of a Muslim who shaves his beard is invalid; if we were to say so, then he would have to rule that Prayer of everyone who is guilty of any sin would also be rendered invalid.
Coming more precisely to the point about whether we are allowed to pray behind an imam who shaves his beard, the answer is “yes.” For the most, one can say about such a person (i.e. who shaves his beard, thus deviating from the Sunnah) is that he is guilty of a major sin and therefore he may be considered a fasiq (sinner/ transgressor); however, no one in his right mind would go as far as calling that person a kafir or infidel. Thus if we were to consider him a fasiq, then the preferred view, as authenticated by scholars and jurists, is that we are allowed to pray behind with him being the imam. This is the view of the Hanafi school, as it has been stated in the famous work of the Hanafi school called Bada’i` As-Sana’i` fiTartib Ash-Shara’i` by Imam `Alaa‘ Ad-Din Al-Kasani (587 AH). The reasoning is stated as follows: We are allowed to pray behind any one whose Prayer is considered as valid. No one would say that Prayer of a fasiq is invalid.
Furthermore, as explicitly stated in the above-mentioned work, this point of view is supported by clear precedents from the practice of As-Salaf As-Salih, including the Prophet’s Companions and their successors: It is well-known that great Companions, such as AnasibnMalik and Ibn `Umar, as well as great scholars of the generation of Tabi`in (first generation of Muslims after the death of the Prophet) used to pray behind tyrants such as Hajjaj and others who were guilty of far more heinous crimes and sins. Who would dare to compare the sin of shaving one’s beard with the crimes of Hajjaj who was a mass murderer as many innocent people perished at his hands?
those Companions and scholars of As-Salaf As-Salih who prayed behind such tyrants and despots never thought it to be wrong to pray behind a fasiq: Their reasoning being that Prayer is the noblest deed that a person can ever do, and hence there is no justification in refusing to pray behind such people if they happened to lead the Prayer. Having said this, however, I must add: If we have a choice to do so, we should put forward to lead the salah only those who are exemplary in their character and knowledge.
To conclude: The authentic view of the Hanafi school and the most preferred view of scholars is that we are allowed to pray behind people who shave their beards just as we are allowed to pray behind people who are guilty of sins, although in the event of a choice, we are best advised not to put them forward as imams to lead the salah.
May Allah inspire us all to see truth as truth and help us to follow it, and may He inspire us all to see error as error and help us to shun it, amen.