# Ali ibn Ja'far al-Hamani

Ali ibn Ja'far al-Hamani was a representative of Ali al-Hadi. Suspecting this, al-Mutawakkil imprisoned him, initially for life. He was later pardoned when the caliph declared a general amnesty, evidently hoping that this show of mercy would cure him of an illness. Ali was entrusted by al-Hadi and later Hasan al-Askari with large sums of money, which he spent at his discretion. The evidence is that al-Askari in a letter defended Ali ibn Ja'far against the accusations of 'reckless spending' by another Shia, named Abu Tahir al-Balal.
Faris ibn Hatim ibn Mahawayh (initially a representative of al-Hadi) was involved in a dispute with Ali ibn Ja'far around 862 and was consequently banned by al-Hadi from receiving religious funds on his behalf.

## Disputes
### With Faris

Faris was one of al-Hadi's senior agents in Samerra, and he had a conflict with Ali ibn Ja'far. This difference eventually led to bitter quarrels and mutual ambivalence, which in turn caused discomfort in the Shia community and the unwillingness of some to pay their financial obligations to al-Hadi. Moreover, al-Hadi's local representatives, who had previously sent their collections to al-Hadi through these two helpers, no longer knew which one they could trust. Al-Hadi against Faris sided with Ali bin Ja'far and ordered his representatives not to use the former for their business with al-Hadi:

### With al-Qazvini

According to Kashshi, One day there was a dispute between Ali Ibn Ja'far and Ibn Qazwini. Ibrahim ibn Muhammad Hamdani wrote a letter to al-Hadi and asked him to show him which of them to follow. al-Hadi replied to him:
   It should not be asked about one like this man, and there is no doubt in him. Allah has glorified the position of the patient (Ali bin Ja’far) where al-Qazwini is compared to him! Go to him to satisfy your requests and questions and let those who follow you go to him to satisfy their needs and answer their questions and to avoid al-Qazwini and not let him interfere in their affairs for I have been informed of what he fabricated among people. Do not pay him any attention inshalah!

## In Mutawakkil prison

They spoke ill of Ali bin Ja'far to Mutawakkil(r. 847–861), who ordered to imprison Ali. As the period of his imprisonment increased, he had to spend three thousand dinars to ask Abdullah ibn Khaqan to mediate for his freedom. Abdullah ibn Khaqan shared the story with Mutawakkil, who said: "O Abdullah! If I had doubts about you, I would have said that you are Rafizi, this man is the agent of so-and-so (al-Hadi) and I have decided to kill him. On hearing this news, Ali wrote a letter to al-Hadi who wrote back: "Now that I see that your situation has reached this level, I turn to God about you." This letter reached Ali on the night before Friday . On Friday morning, Mutawakkil fell ill and his illness worsened and reached its peak on Monday. So he ordered to release all the prisoners whose names were presented to him until he reached the name of Ali ibn Jafar. He asked Abdullah: "Why didn't you talk to me about him?" Abdullah said: "I will never mention him again." But Mutawakkil ordered to release him quickly and asked him for forgiveness. Ali went to Mecka on the order of the Imam and settled there.