Ishaq bin al-Abbas al-Farsi, the Abbasid governor of Ray privily professed Ismaili doctrines. Muhammad betrothed to Fatima, the daughter of Sarah, sister of Ishaq bin al-Abbas; who gave birth to a son, who was named Abdullah, also known as Wafi Ahmad. When the news of Muhammad bin Ismail's stay at Ray reached the ears of Harun ar-Rashid, he wrote to Ishaq bin al-Abbas, ordering to arrest Muhammad and send him to Baghdad. Upon receipt of caliph's letter, he showed it to the Imam and replied to the caliph that he found no trace of Muhammad, and would send as soon as he was arrested, and thus he tried to put the caliph off the scent. But the spies planted by Baghdad were vigilants and reported to the caliph that Muhammad bin Ismail not only was living at governor's house, but that he was directing his mission from there. Upon this, the caliph wrote another letter to Ishaq bin al-Abbas, impugning him to come in person with his forces if his orders were not obeyed forthwith. The governor however made his usual reply.
Meanwhile, the complaints about Ali bin Musa bin Mahan, the governor of Khorasan reached the point where Harun ar-Rashid could no longer ignore them. With the intention of deposing his governor and to make a search of the Ismaili Imam, Harun ar-Rashid adopted a militant stance. In 189/805, he marched towards Ray with a detachment of his army, and after searching for the Imam through a tracking party, ordered the arrest and torture of Ishaq bin al-Abbas. He however did not give away any clue of the whereabouts of the Imam. Ishaq died as a result of severe and cruel torture that was inflicted upon him, and was rigorously flogged till death. He did not waver and stood firm in spite of excruciating tortures. In spite of the gloomy situation, however, his faith remained unshakable.