Abu Sa'id Tirmizi, known as Abu Tirmizi was an Iranian Ismaili dai. He seems to have been active in the villages of Iraq. Tradition has it that he once happened to visit Baghdad and joined the philosophical deliberations of the Mutazalites in the Abbasid court. It is recounted that someone informed caliph Mamun that Abu Tirmizi was an Ismaili dai, whereupon, he summoned him in a separate chamber. Mamun treated him tactfully, pretending that he was too a secret follower of Taqi Muhammad and said, "I am an ardent lover of the Imam. I cherish a desire to hand over my caliphate to the Imam when I behold him and will serve him whole- heartedly." Abu Tirmizi delighted on Mamun's words, but did not divulge his identity and left the court. He resided in Baghdad for few months and when he found that nobody followed him, he made his way towards Salamia and visited Imam's residence. During the course of discussion, he said to Taqi Muhammad that, "Mawla! caliph Mamun feels himself ashamed in his actions against us. He is ready to abdicate the temporal power in your favour, therefore, you manifest publicly and assume the caliphate." Taqi Muhammad said, "O' Tirmizi! you have not yet known the deceitful trick of the Abbasids. The heart of Mamun is full of animosity. He is a liar and hypocrite. His heart is harder than stone." Abu Tirmizi however continued to insist, whereupon the Imam said, "I allow you to go once again to Mamun's court if you have still trust on his words and claim yourself as if an Imam. He will swiftly hand over you his caliphate if he is truly a follower. If so, you let me know, so that I may manifest publicly." Abu Tirmizi said, "Mawla! Mamun is very clever and will persecute me if I fail to show him the signs of Imamate if asked." Taqi Muhammad replied, "The time itself will favour you. He will be surprised through my light and you will surely pass through his trials. But remember, Mamun is not a faithful and he will execute you."
Abu Tirmizi returned to Baghdad and managed to see caliph Mamun once again and said, "O'caliph! I am an Imam on earth. I have concealed my legitimate claim during our first meeting due to your fear. You must trust me, as I am indeed an Imam." Upon hearing, Mamun discoursed with him on religious matters and asked many questions. When he became satisfied, he ordered his soldiers, who brutally beheaded Abu Tirmizi in the court. It is also said that caliph Mamun was made known that he had executed an Ismaili dai and not the Imam, therefore, he ordered to find whereabouts of Imam Taqi Muhammad.