But he also knew that his Government had already lost face...
But he also knew that his Government had already lost face due to its prolonged maltreatment and eventual assassination of Imam Musa Ibn Ja’far (as) or perhaps the tyrant felt the stings of conscience which kept him from harassing the 8th Imam.
It is said that once Yahya Barmaki, his Prime Minister, in order to gain the ruler’s favor, informed Harun that Imam ‘Ali Ibn Musa (as) claimed Imamate in the same way his father had done, Harun coldly replied, “We have already inflicted cruelties on his father, do you expect me to annihilate this family altogether. Still, Harun was antagonistic towards the Prophet’s descendants and persisted in maltreatment of most of them in Madina.
The local Governors of Madina who wished to please the ruler could not afford to be fair to Ahlul Bayt. People could not visit the Imam freely seek his knowledge, and he had little chance to teach his followers openly, for the eyes of the agents of Caliph focused unceasingly on the activities of the Imam. Political wranglings in Baghdad between the two sons of Harun were rocking the Empire.
His elder son Amin who had an Arab mother had the support of the Arabs and most of the Abbasid elders, while the younger son Mamun had a Persian mother and was supported by the Persians. To console both factions Harun took a pledge from both his sons that after his death Amin will rule the Arab part of the Empire while Mamun will rule the Persian side. When Harun died in faraway Tus, the most northern town of his Persian Empire, Mamun was with him and buried him there.
Amin in Baghdad immediately proclaimed himself the Caliph of the whole empire and immediately deposed Mamun from the rulership of the Persian Province. Mamun’s main concern was to subdue the Persian province under any circumstances. He realized that the majority of Persians favored the teachings of Ahlul Bayt and if somehow he could persuade the Imam of the Ahlul Bayt in Madina to side with him, he could confirm his rule there.
Once he felt secure on that side of the Empire, he would then rise against his brother and easily depose him. So the orders were sent out for the Imam to leave his home in Madina and go to the Abbasid ruler in faraway Tus. Imam, as if by some miracle knew what was to come. So he left his wife and only son Muhammad Ibn ‘Ali al Jawad, later known as Imam Muhammad Taqi (as) in Madina.