Volume 4, Book 52, Number 205 :
Narrated by Ibn ‘Umar (radiallaahu `anhu)
When we reached (Hudaibiya) in the next year (of the treaty of Hudaibiya), not even two men amongst us agreed unanimously as to which was the tree under which we had given the pledge of allegiance, and that was out of Allah’s Mercy. (The sub narrator asked Naf’i, “For what did the Prophet (sallallaahu `alayhi wasallam) take their pledge of allegiance, was it for death?” Naf’i replied “No, but he took their pledge of allegiance for patience.”)
Volume 4, Book 52, Number 206 :
Narrated by ‘Abdullah bin Zaid (radiallaahu `anhu)
That in the time (of the battle) of Al-Harra a person came to him and said, “Ibn Hanzala is taking the pledge of allegiance from the people for death.” He said, “I will never give a pledge of allegiance for such a thing to anyone after Allah’s Apostle (sallallaahu `alayhi wasallam).”
Volume 4, Book 52, Number 207 :
Narrated by Yazid bin Ubaid
Salama (radiallaahu `anhu) said, “I gave the Pledge of allegiance (Al-Ridwan) to Allah’s Apostle (sallallaahu `alayhi wasallam) and then I moved to the shade of a tree. When the number of people around the Prophet (sallallaahu `alayhi wasallam) diminished, he said, ‘O Ibn Al-Akwa ! Will you not give to me the pledge of Allegiance?’ I replied, ‘O Allah’s Apostle! I have already given to you the pledge of Allegiance.’ He said, ‘Do it again.’ So I gave the pledge of allegiance for the second time.” I asked ‘O Abu Muslim! For what did you give he pledge of Allegiance on that day?” He replied, “We gave the pledge of Allegiance for death.”
Volume 4, Book 52, Number 208 :
Narrated by Anas (radiallaahu `anhu)
On the day (of the battle) of the Trench, the Ansar were saying, “We are those who have sworn allegiance to Muhammad for Jihad (forever) as long as we live.” The Prophet (sallallaahu `alayhi wasallam) replied to them, “O Allah! There is no life except the life of the Hereafter. So honor the Ansar and emigrants with Your Generosity.” And narrated Mujashi: My brother and I came to the Prophet (sallallaahu `alayhi wasallam) and I requested him to take the pledge of allegiance from us for migration. He said, “Migration has passed away with its people.” I asked, “For what will you take the pledge of allegiance from us then?” He said, “I will take (the pledge) for Islam and Jihad.”
Bay’ah can only be given to the leader of the Muslims, and bay’ah is given by the decision makers – i.e., the scholars and people of virtue and status. Once they give their allegiance to him, his position of leadership is confirmed, and the common folk do not have to give allegiance to him themselves, rather they have to obey him so long as that does not entail disobedience towards Allaah.
Al-Maaziri said: With regard to bay’ah being given to the leader of the Muslims, it is sufficient for the decision makers to give him their bay’ah. It is not essential for each individual Muslim to come to him and put his hand in his, rather it is sufficient to commit oneself to obeying him and submitting to him by not going against him or rebel against him.
Quoted from Fath al-Baari.
Al-Nawawi (may Allaah have mercy on him) said in Sharh Saheeh Muslim:
With regard to bay’ah (oath of allegiance): the scholars are agreed that in order for it to be valid it is not essential for all the people or all the decision makers to give their bay’ah. Rather, if bay’ah is given by those scholars and people of virtue and status who are present, that is sufficient. It is not obligatory for each person to come to the leader and put his hand in his and give his oath of allegiance to him. Rather what is required of each individual is to submit to him and not go against him or rebel against him.
What is narrated in the ahaadeeth narrated in the books of Sunnah about bay’ah refers to giving allegiance to the Muslim leader, such as when the Prophet (peace and blessings of Allaah be upon him) said: “Whoever dies and did not make an oath of allegiance (to the Muslim leader) has died a death of jaahiliyyah.” (Narrated by Muslim, 1851).
And he (peace and blessings of Allaah be upon him) said: “Whoever gives his oath of allegiance to a leader and gives him his hand and his heart, let him obey him as much as he can. If another one comes and disputes with him (for leadership), kill the second one.” (Narrated by Muslim, 1844)
And he (peace and blessings of Allaah be upon him) said: “If allegiance is given to two khaleefahs, then kill the second of them.” (Narrated by Muslim, 1853).
All of that undoubtedly has to do with giving allegiance to the Muslim leader.
Shaykh Saalih al-Fawzaan (may Allaah preserve him) said, answering a question about giving allegiance to the various groups: Bay’ah only has to do with the leader of the Muslims; these various bay’ahs are innovated and they are among the causes of division. The Muslims who are living in one country or one kingdom should have one allegiance to one leader; it is not permissible to have several kinds of bay’ah.al-Muntaqa min Fataawa al-Shaykh Saalih al-Fawzaan, 1/367
With regard to how the allegiance should be given to the leader, in the case of men it is done in word and in deed, namely with a handshake. In the case of women, it is done by word only. This is proven in the ahaadeeth which speak of how allegiance was given to the Messenger of Allaah (peace and blessings of Allaah be upon him).
For example, ‘Aa’ishah (may Allaah be pleased with her) said: “No, by Allaah, the hand of the Messenger of Allaah (peace and blessings of Allaah be upon him) never touched the hand of any (non-mahram) woman. Rather he would accept their allegiance (bay’ah) in words only.”
(Narrated by al-Bukhaari, 5288; Muslim, 1866)
Al-Nawawi (may Allaah have mercy on him) said in his Sharh (commentary): “This indicates that for women, allegiance is given in words only, without taking the hand of the leader, and for men it is done in words and by taking his hand.
And Allaah knows best.