Muhammad bin Hanafiya (a s) ibn Ali (a s)
When Imam Husayn left Madina for Makkah along with the members of his family, his brother Muhammad bin Hanafiya remained in Madina. The mother of Muhammad, the son of Ali, belonged to a tribe named Bani Hanafiya and on this account he was called Muhammad bin Hanafiya. He was a magnanimous, brave and pious person.
Although Kaisaniya sect considered him to be an Imam he himself believed in the imamate of his brother Imam Hasan after his father Imam Ali, and thereafter in the imamate of his second brother Imam Husayn and then in the imamate of his nephew Ali bin Husayn. He was a distinguished person among the Ahlul Bayt and showed great valor in the battles fought by Imam Ali the Commander of the Faithful.1
When Imam Husayn left Madina for Makkah he wrote a testament for his brother Muhammad bin Hanafiya. It has been narrated by Ibn Tawus. In this testament the Imam mentioned the motive for his rising and clarified the policy which he intended to pursue in all circumstances. He also referred to the false motives which instigate a man and make him fight to satisfy his carnal desires and stated that the godly persons are free from such motives. The testament reads as follows:
In the name of Allah, the Beneficent, the Merciful.
"This is the testament of Husayn bin Ali bin Abi Talib written by him for his brother Muhammad, known as Ibn Hanafiya. Indeed Husayn testifies that there is no god except Allah and no being other than Him is fit to be worshipped and He has no partner. He also testifies that Muhammad is Allah's servant and messenger, who has brought truth from Him, and that Paradise and Hell do exist and the Day of Judgment is bound to come and there is no doubt about it, and on that day, Allah will bring the dead to life".
What the Imam said consists of the very doctrines which it is necessary for every Muslim to hold, and one who does not hold them cannot be a Muslim. Apparently the Imam meant to say that these very principles were in danger and, if the matters were allowed to continue in that manner, it was possible that the regime of the time might not refrain even from attacking these Principles of Faith. In fact the real motive for the Imam's rising was the protection of these very principles on which other religious and social tenets of Islam are based