Bayʿah (Arabic: بَيْعَة, Pledge of allegiance"), in Islamic terminology, is an oath of allegiance to a leader. It is known to have been practiced by the Islamic prophet Muhammad. Bayʿah is sometimes taken under a written pact given on behalf of the subjects by leading members of the tribe with the understanding that as long as the leader abides by certain requirements towards his people, they are to maintain their allegiance to him. Bayʿah is still practiced in countries such as Saudi Arabia and Sudan. In Morocco, bayʿah is one of the foundations of the monarchy. In many Islamic traditions, the meaning is to dedicate oneself to a spiritual master, pir or sheikh in exchange for the spiritual knowledge he gives.
The tradition of bayʿah can be traced back to the era of Muhammad. From the beginning bayʿah was taken by Muhammad as an oath of allegiance. Anybody who wanted to join the Islamic community did so by reciting the basic statement of the faith expressing his faith in the oneness of God and the prophethood of Muhammad. However, this differed from the proclamation of faith necessary to simply become a Muslim. In addition to this the prophet formally took bayʿah from the people and tribes. Through this formal act they entered the Islamic community and showed their willingness to follow and obey Muhammad. The wordings of the oath differ in different traditions but it contains the shahada and prayers of repentance.
It is reported that at the occasion of annual gatherings outside Mecca, Muhammad met people from Yathrib, later to be renamed Medina, who accepted his call towards Islam. Muhammad then took bayʿah from them.
After the Pledge of the Tree, which led to the Treaty of Hudaybiyyah, the following was revealed in the Qur'an commemorating and appreciating the pledge and those who made it: