The term bāb () was used in early Shia Islam for senior disciples, and authorised deputies, of the current Imam. Less commonly, the term is also applied to the Imams themselves, as well as to Muhammad and other prophets in Islam.

Origins
The term emerged in the 9th century, designating a senior disciple of an Imam who functioned as his authorised representative. Given the belief that the Imams were divinely inspired, this disciple was the "gate" () to the Imam and the esoteric knowledge he possessed. The first such  is held to have been Salman the Persian, one of the companions of Muhammad. This concept has Gnostic roots, and is commonly ascribed in later literature to the 8th-century extremist () proto-Isma'ili group of the Mukhammisa, but this is not borne out by actual 8th-century texts.

Isma'ilism
The term was in use in the early Isma'ili movement for "a figure in the hierarchy of the missionary movement who participated in preaching an esoteric interpretation of the Islamic revelation". The early Isma'ili missionary and author Ja'far ibn Mansur al-Yaman also applied the term to the designated successors of the Imams, and to Ali ibn Abi Talib as the successor of Muhammad.

After the establishment of the Fatimid Caliphate in 909, the  became a rank in the official Ismai'ili religious hierarchy (the ). The Fatimid-era  was second only to the Fatimid imam-caliph, and is also known by the designation of "chief caller" (). The latter term is commonly used in historians' accounts, whereas Isma'ili sources prefer the term . The  functioned as the intermediary () between the Imam and the community of the faithful. Under the  were twelve s ("seals"), who conducted the affairs of the .

The office gradually declined and disappeared altogether after the end of the Fatimid Caliphate. Nasir al-Din al-Tusi, who recorded the hierarchy of the Nizari Isma'ili state during the 13th century, mentions the presence of an official called , co-equal with the ; but the rank is no longer mentioned in later sources.

Twelver Shia

The 10th-century Isma'ili author Ibn al-Haytham reports that the Twelver Imams designated a steward of their imamate with the title of  during the minority of their designated successors, but this usage does not appear in contemporary Twelver sources. In Twelver sources, the term is only used for the Imams themselves, as "the gates through which (knowledge of) God is attained", in the words of the 10th-century Twelver scholar Muhammad ibn Ya'qub al-Kulayni. Ali is thus often called "the gate of the prophet", who in turn is "the gate of God"; in a hadith, Muhammad is reported as saying "I am the city of knowledge and Ali is the gate; will you enter the city other than by its gate?" 

The term was applied for the Four Deputies of the twelfth and final Imam, Muhammad al-Mahdi: Abu Amr Uthman ibn Sa'id, his son Abu Ja'far Muhammad, Abu al-Qasim al-Husayn ibn Ruh al-Nawbakhti, and Abu al-Hasan Ali ibn Muhammad al-Samarri. These men served as "gates" (), i.e., as representatives of the hidden twelfth imam in 873–940. After that, the concept of the Imam's Major Occultation was adopted, leading to the abandonment of the post of . Later Twelver theologians, such as Nasir al-Din al-Tusi, came to reject the concept of a disciple functioning as a gate for the Imam, as with the Isma'ilis, as typical of  sects.

Alawites
Among the Alawites, whose cosmology also has Gnostic roots, the  is the junior divine emanation in a triad, which is further comprised the Godhead itself, or "the Essence" (), and "the Name" () or "the Veil" (). According to Alawite doctrine, this triad is incarnated in each successive historical cycle; the role of the , along with the , is to "veil" the true character of the : the  is the "silent" Imam, the  is the public, "speaking" Imam, and the  the gateway to the Imam. Thus in the present, Islamic cycle, Ali is the real Godhead, veiled by Muhammad as his , with Salman the Persian as his . Each of the eleven Imams then had his own , who acts as the intermediary between Imam and the faithful. The founder of the Alawite sect, Ibn Nusayr, is held to have been as the  to the eleventh Imam, Hasan al-Askari.

Druze
In the Druze cosmology, the  is the incarnation of the Universal Intellect (), which in the Druze cosmic hierarchy is located directly below God. Thus the founder of the Druze religion, Hamza ibn Ali ibn Ahmad, proclaimed himself the  to the contemporary incarnation of God, Caliph al-Hakim bi-Amr Allah.

Babism

In the early 19th century, the Shaykhi school of Twelver Shi'ism emerged in Iran when some Twelvers considered Shaykh Ahmad al-Ahsa'i and his successor Kazim Rashti as the  to the Hidden Imam. This tradition provided the foundation of the religion of Bábism, when its eponymous founder, Ali Muhammad Shirazi, took the title of Báb.

See also
 Ayatollah
 Da'i
 Da'i al-Mutlaq
 Hujja

References

Sources 

 
 
 
 

Ismailism
Shia belief and doctrine
Islamic terminology
Religious titles