The Ghurabiyya Shi‘a were a ghulat sect of Shi‘a Islam. They are one of the best known of a few extremist Shi‘i sects who adopted the belief that the angel Gabriel was mistaken when passing on the prophecy to Muhammad instead of Ali.

Etymology
The name of the Ghurabiyya sect comes from the Arabic غراب ghurāb, meaning "Ravens". They received this name because of their belief that Muhammad resembled Ali very much, as much or more than one raven resembles another raven. However, when Muhammad's religious career began he was 40 years old, and Ali was a 9 year old boy

History
While passing through Syria at the turn of the 13th century, the Andalusian traveler Ibn Jubayr noted that the Ghurabiyya Shi‘a were among the Shi‘a sects represented in Syria at that time.

Furthermore, a document written around 1200 C.E. called “al-Maqama al Kilwiyya” discovered in Oman, gives details of a mission to reconvert Kilwa (an island in Tanzania) to Ibadism, as it had recently been affected by the Ghurabiyya doctrine from southern Iraq. The document also mentions an apostate from Ibadism called al-Munghirah. Another reference to the influence of the Ghurabiyya Shi‘a comes from the Syrian biographer and geographer Yaqut, who, writing before 1224 C.E., reported that the Sultan of Pemba (another island in Tanzania) was an Arab who had recently emigrated from Kufa, suggesting that the doctrines of the Ghurabiyya, strongly present in Kufa, had also spread to Pemba.

Beliefs

The Ghurabiyya Shi‘a had the following beliefs:
 God's knowledge is temporally produced.
 God does not know anything until after he creates it.
 God may change his mind about matters just like a person who acquires one opinion after another. This belief was an extreme form of Bada’.
 Ali was supposed to be the Messenger and Prophet of God.
 God dispatched the angel Gabriel to Ali and had ordered him to take the Qur'an to Ali, but Gabriel turned away from him with the message and went to Muhammad due to his enthusiasm for him, or by mistake on his part due to being confused by the exact similitude between Muhammad and Ali and (consciously or not) is said to have revealed and transmitted the Qur'anic message to Muhammad instead of to Ali. When Gabriel returned to God, God said, “Were it not that the Quraysh would say that the Lord of Muhammad is irresolute, I would send you to Ali once again and I would dismiss Muhammad. But go instead back to Muhammad and tell him I am appointing Ali to share prophecy with him as long as both shall live, and say: “but you are only a warner (i.e. Muhammad) and for every nation there is a guide (i.e. Ali).” When Gabriel came back to Muhammad and informed him of the message of God, Muhammad said to Ali at that moment, “You are to me in the position of Harun (Aaron) to Musa (Moses) except that there will not be a prophet after me.”
 Muhammad was a warner and Ali was a guide by drawing upon further support from the words of God in the Qur'an: “Can they be like those who accept a clear sign from their Lord and there follows him (i.e Muhammad) a witness (i.e. Ali) from Him.“
They were justified in cursing Gabriel, for the reason of Gabriel going to Muhammad instead of Ali.
They believed that it had been verified in a report that Ali was the partner of Muhammad in prophecy during his lifetime just as Aaron was the partner of Moses in the apostleship. For that reason Muhammad said, “No prophet after me” but did not say, “no prophet alongside me,” since Gabriel visited them both together with the revelation.
When Muhammad died, the inspiration was withdrawn from Ali.
The Imamate is only restricted to the offspring of Ali.
The descendants of Fatimah and the other descendants of Ali all have an equal right to the Imamate.
The descendants of Ali are from the lineages of 5 people: Hasan ibn Ali, Husayn ibn Ali, Umar, al-‘Abbas, and Muhammad.
The Imam is anyone who rises from among the descendants of Ali with sword unsheathed, summoning to the Qur'an and the Sunnah of Muhammad and who is just and knowledgeable.

See also
Islamic schools and branches
List of extinct Shia sects

References

Sources
An Ismaili heresiography: the "Bāb al-shayṭān" from Abū Tammām's Kitāb al ..., By Wilferd Madelung, Paul Ernest Walker, pg.102-103

Shia Islamic branches
Ghulat sects
Extinct Islamic sects