Abd Allah ibn Muhammad ibn al-Hanafiyya

ʿAbd Allāh ibn Muḥammad ibn al-Ḥanafiyya (عبد الله بن محمد بن الحنفية) (died 98 AH; c. 716 CE), also known as Abū Hāshim was a member of the Banu Hashim clan of the Quraish tribe in Mecca. He was one of the Salaf and a narrator of hadith. After Muhammad ibn al-Hanafiyya died, his son Abu Hashim claimed the Imamate. According to medieval mystic Jami, Abu Hashim was the first person to be called a "Sufi".

Life
After Abu Hashim's death, the Abbasids claimed that on his deathbed Abu Hashim had nominated his distant cousin Muhammad ibn Ali ibn Abd Allah ibn Abbas ibn Abd al-Muttalib ibn Hashim as the Imam. His son Abu al-Abbas Abd Allah al-Saffah became the first Abbasid caliph, repudiating Shi'ism, which effectively extinguished the sect that had recognized Muhammad ibn al-Hanafiyya as an Imam.

Abu Hashim's father was Muhammad ibn al-Hanafiyya, a son of Ali. Abu Hashim had a brother named Hasan.

After his father's death in 700 CE, the Hashimiyya sub-sect of the Kaysanites Shia looked to Abu Hashim as the heir of his grandfather Ali. After his own death, the early Abbasids claimed that Abu Hashim had designated Muhammad, father of the first two Abbasid caliphs, al-Saffah and al-Mansur, as his heir and head of the clan of the Banu Hashim.

According to the Sunnis, Ibn Hajar al-Asqalani graded the two sons of Muhammad ibn al-Hanafiyya to be weak in Hadith, arguing that one was a murji'i, and the other to be a Shi'ite.

On the other hand, Ibn Sa'd stated that "Abu Hashim has knowledge and transmission. He was reliable in hadith, and had narrated a few accepted hadiths."