The governors of Mahallat and Qumm were inimical to the family of Imam Khalilullah Ali because of the regular thronging of the Indian pilgrims at his residence. According to "Ibrat-i Afza", an autobiography of Hasan Ali Shah, "The fortunes of the family were at low ebb when Imam Shah Khalilullah was killed in Yazd." Hence, Bibi Sarcar Mata Salamat came to the court at Tehran with his son to seek justice. Her pleadings were immediately successful. Shah Fateh Ali ordered his governor of Yazd, Haji Muhammad Zaman Khan to arrest Hussain Yazdi and his gang. Not content with this retribution, he also invited Hasan Ali Shah at his palace and gave him due honour. Ahmad Mirza Adud'ud Dawla writes in "Tarikh-i Adudi" (Tehran, 1908, p. 69) that, "Finally, as conclusive sign of honour, Fateh Ali Shah gave one of his daughters, Sarv-i Jahan Khanum, in marriage to Hasan Ali Shah, allotting 23,000 tumans of wedding expenses." Hasan Ali Shah had been also invested the honorific title of "Aga Khan" in 1234/1818, including the governorship of Mahallat and Qumm.
It seems that the ceremony to award the title had taken place in Qasr-i Qajar in Tehran. J.M. Tancoigne had been in the palace in 1807, describing its location four miles north of Tehran, vide "Narrative of a Journey into Persia" (London, 1820, p. 180). William Price also visited Tehran in 1817 and writes in "Journal of the British Embassy to Persia" (London, 1925, pp. 38-9) that, "The Takht-i Kajar, or Palace of Kajar, is a noble pile of building situated on an eminence, about half-way between Tehran and Sherman surrounded by beautiful gardens, to which an aqueduct conveys water from the mountains. The beauties of nature and art, richly blended, make this one of the most delightful residence in Persia." Sir Robert Ker Porter (1777-1842) had also visited Qasr'i Qajar in 1818 when Hasan Ali Shah was being crowned the title. He was full of admiration and writes in "Travels in Georgia, Persia, Armenia, Ancient Babylonia" (London, 1821, p. 335) that, "It stands on an eminently pleasant point of the adjoining mountains, being built on a detached and commanding hill, on the great slope of the Elborz. The edifice is lofty, and when seen from a distance, presents a very magnificent appearance."
In 1246/1834, the Syrian Ismailis received a devastating blow from an Ottoman expedition at the command of Ibrahim Pasha, who caused heavy damage to the Ismaili castles and villages. After a decade, an Ismaili chief amir Ismail bin Muhammad of Qadmus succeeded in restoring his authority over the large part of the Ismaili community. He procured close ties with the Ottoman authorities in the time of Sultan Abdul Majid I (d. 1277/1861). In 1843, amir Ismail bin Muhammad petitioned the Ottoman authorities to allow the scattered Ismailis to restore Salamia for their permanent settlement, which was granted. In 1850, the Ottomans also exempted the Ismailis from military service.
Nothing more is virtually known about the Aga Khan I between 1234/1818 and 1250/1834 except a few fragments. A glimpse of the Indian Ismailis of Kutchh in 1234/1818 can be however seen from a description of Captain James Macmurdo, the resident at Anjar, who writes in his "Bombay Literary Transactions"(2nd vol., p. 232) that, "The Khoja is a Mohammaden cultivator, and frequently make a pilgrimage to a spot eight days march to the north-west of Ispahan, where they worship a living Peer or Saint (the Imam) to whom they pay an annual tax on their property." The Aga Khan seems to have been in close contact with the Indian Ismaili communities as is gauged from his different letters. One letter dated December 27, 1820 addressing to the jamats of Sind, Bombay, Kutchh, Surat and other places, stating that the Kamadia would deliver this letter to the jamats. Another letter on records of the Bombay Jamatkhana indicates a permission to build a new Jamatkhana at Bombay in 1820. There are few other letters of March, 1824, October 1825 and November, 1825 relating to the community affairs.
Hasan Ali Shah, the Aga Khan I led a peaceful life in Mahallat, and enjoyed honour at the Qajarid court until the death of Shah Fateh Ali. On 19th Jamada I, 1250/October 23, 1834, Shah Fateh Ali suddenly fainted and fell to the ground in his palace and died. He ruled 38 years, 5 months and 29 days. He was succeeded by his grandson, Muhammad Shah (1250-1264/1834-1848). The Aga Khan attended the coronation of Muhammad Shah in Tehran on January 31, 1835, where he happened to see Major Henry Rawlinson (1810-1895), vide George Rawlinson's "Memoir of Sir Henry C. Rawlinson" (London, 1892, p. 52). The new king Muhammad Shah had consulted with his chief minister, Qaim-maqam Farahani (d. 1251/1835) and appointed the Aga Khan as the governor of Kirman in 1251/1835.
The Aga Khan returned back to Mahallat, and upon his arrival, the celebrated Qajarid penegyrist Habib, known as Qa'ani (1807-1854), composed a qasidaof fifteen lines, praising the exellences of the Imam, vide his "Diwan" (Tehran, 1957, pp. 180-1), whose opening lines run as under:-
"Eternal life in the world were necessary, to sing one tenth of the Aqa Khan's praise."
The province of Kirman was then in the hands of the rebellious sons of Shuja al-Saltana, a pretender to the throne, and it was also regularly raided by the Afghans and Baluchis. The Aga Khan diplomatically restored order in Kirman with his own resources. Both Bam and Narmashir held for a long time by the rebellions, were also taken back. The Aga Khan sent a report of his victories to Tehran, but he obtained no appreciative words due to the rumours that he was extending his influence in southern Iran. The Aga Khan had paid half the expenses incurred in the campaign upon the words of the prime minister, Mirza Aqasi that he might recoup himself from the revenues of that province, but the Aga Khan did not touch the revenues and made his claim in the aforesaid report. Despite his valuable services, his governorship was short-lived in Kirman.
In 1252/1837, about twenty months after his arrival in Kirman, the Aga Khan was replaced by another governor, Firuz Mirza Nusrat ad-Dawla, and was recalled to Tehran. Trusting on the rumours, Muhammad Shah also took field against the Aga Khan in command of Suhrab Khan. Instead of making an investigation, the king's militant stance had been a source of surprise to the Aga Khan. He had no other alternative but to take arms for defensive measures. The fortress of Bam near Kirman was then in the hands of the king's artillery men, who had betrayed their chief. The Aga Khan was able to occupy this fort without difficulty in September, 1937. He refused to withdraw with his forces from the citadel of Bam until the principal cause of the court intrigues followed by his dismissal was not shown to him. The Iranian empire turned a deaf ear to him. Rather, his defensive actions were branded a rebellion. Obviously, the accusations branded upon him were highly exaggerated. The Iranian chronicler, Rida Quli Khan Hidayat, for instance in "Raudat-us-Safa'i Nasiri" (Tehran, 1922, 10th vol., p. 260) has lebelled the actions of the Aga Khan as an act of revolt. An important analyst of the fact will be able to judge how much truth there was in the biographical work, "Ibrat-i Afza" (Tehran, 1946, p. 20) of the Aga Khan, in which he disclaimed any desire for temporal power and said: "Through the grace of God and the blessing of my immaculate forefathers and ancestors, I am able, from the wide and lofty expanse of darwishhood, to disdain and despise all monarchy." In sum, the Aga Khan was driven to desperate straits and had to take up arms in self-defence. He had however a large and substantial following in Iran. Had he chosen, he could have mustered a big army to shake the Qajarid throne, but he was loath to fight with the king for whom he had a regard.
The Aga Khan's dismissal from the governorship of Kirman is also occasioned by the rivalries for the headship of the Nimatullahi order in Iran. It is said that Muhammad Jafar, known as Majdhub Ali Shah (d. 1239/1823), the 38th qutb of the order was succeeded by Zain al-Abidin Shirwani, known as Mast Ali Shah (1196-1253/1782-1837). Once the Aga Khan, during Fateh Ali Shah's rule had given refuge to Mast Ali Shah in the village of Daulatabad, near Mahallat, who had escaped the violent persecution of the Shia ulema of Fars. During the coronation of Muhammad Shah, Mast Ali Shah, who had been enjoying the Aga Khan's hospitality at Mahallat, accompanied a certain Ismaili friend to Tehran. Muhammad Shah too, had certain Sufic loyalties, and joined the Nimatullahi order before his coronation. Soon afterwards, Mast Ali Shah came to know Haji Mirza Aqasi, the prime minister (sadr'i azam), as his powerful rival, who as Nimatullahi aspired to the leadership of the order. Muhammad Shah also accepted him as the qutb of the Nimatullahi order. It resulted Mast Ali Shah to incur the disfavour of the king, and was driven from the court. Since Aga Khan had continued to support his friend, Mast Ali Shah, he arose the enmity of Mirza Aqasi, who intrigued against him and caused his removal from the governorship of Kirman.
It is also said that a certain Abdul Muhammad Mahallati had demanded one of the daughters of the Aga Khan in marriage to his son, which was not accepted. Thus, Abdul Muhammad Mahallati, initially in the service of the Aga Khan, had risen to a high position in the service of Mirza Aqasi in Tehran, aroused him against the Aga Khan. In sum, Mirza Aqasi, the prime minister was responsible to have stirred up Muhammad Shah, the Qajarid king against the Aga Khan. E.G. Browne in his "A Literary History of Persia" (London, 1930, 4th vol., pp. 147-9) also admits the bone of contention between the Aga Khan and the Iranian king due to the arrogant behaviour instigated by Mirza Aqasi, and concerning whom many ridiculous anecdotes are still current in Iran. However, kings are guided generally more by the prime ministers than by personal judgements, therefore, Mirza Aqasi being an old tutor of the king wielded more influence over him.
In the meantime, Rida Quli, the grandson of Fateh Ali Shah, had taken refuge with the British in Baghdad, reported alleged details of news to Palmerston through the British resident Col. Taylor, claiming that the Aga Khan had formed an alliance and mutual league with the people of Sistan and the army of Baluchis. This further gave weight upon the rumours to the so called rebellion of the Aga Khan.
In a letter to Viscount Falkland (1803-1884), the governor of Bombay, the Aga Khan had also disclosed on April 18, 1851 that, "The cause of my having been blamed before was the hot disposition of Haji Mirza Aqasi who had obliged me to leave the Persian court." According to Mohsin Saee in "H.R.H. Prince Aga Khan's Visit to Iran 1951" (Karachi, 1953, p. 4), "Haji Abdul Muhammad, out of treachery and meanness, poisoned the ears of some of the court ministers against Aga Hasan Ali Shah, who was ultimately constrained to migrate to India in 1841." It must be remembered that Aga Khan III, the grandson of Aga Khan I had visited Iran in 1951 to attend the marriage of King Muhammad Reza Shah Pehlavi with Queen Sorayya, and during that occasion, the Iranian newspapers had highlighted the historical relation of the Aga Khan I with the Iranian empire, but none of them had referred to the term rebellion for the Aga Khan I. For instance, the daily "Iqleem" of February 12, 1951 wrote: "The wicked designs of Haji Mirza Aqasi, the then prime minister of Iran, proved an obstacle in promoting the relations of this glorious family with the royal family of Qajar. Not being inclined to perpetuate the struggle and thereby causing bloodshed, Aga Hasan Ali migrated to India."
It is an undeniable fact beyond a least doubt that the Iran was an arena of the bigoted Shia mulla and theologians at that time, where an Ismaili Imam hardly rule the country in peace for a long time, and as such, the notion advanced by the authors that the Aga Khan I had revolted for capturing the Qajarid throne is absolutely untrue.
The animosity of the Qajarids became more and more virulent, therefore, the Aga Khan at once recalled his brother Sardar Abul Hasan Khan from Baluchistan, where he was conducting military campaigns, and his another brother Muhammad Bakir Khan from Rawar. He prepared to resist the royal forces. He was besieged 14 months at Bam, a town in the province of Kirman, about 120 miles south-east of the city of Kirman on the western edge of the great salt desert, Dasht-i Lut.
In a dispatch to Palmerston, the British minister Sir J. McNeill (1838-1841) from Tehran reported on September 28, 1837 that, "The Aga Khan continues to hold out in the fortress of Bam, near Kerman, and had made some successful sorties against the besieging force", vide "Correspondence Relating to Persia and Afghanistan" (London, 1839, p. 64). In January, 1938 the Aga Khan moved slightly in the south and occupied the fort of Kaheen, half way between Bam and Kirman. During the encounter, Muhammad Bakir Khan was seriously wounded and taken prisoner. On Faridun Mirza's intercession, who was then the governor of Fars, the Aga Khan emerged from the citadel of Bam, but he was arrested and his possessions had been sacked. He and his family members were transferred to the city of Kirman, where they remained for 8 months.
Thus, the Aga Khan was detained to house-arrest in Kirman, and during which time, he continued to see his followers of Badakhshan, Khorasan and India. H.B.E. Frere (1815-1884) cites an account of the Indian pilgrims in "The Khojas: the Disciple of the Old Man of the Mountain" (MacMillan Magazine, vol. 34, 1876, p. 432) that, "One witness in the Bombay trial gave a narrative of the pilgrimage of this kind that he made in 1836-37 to Kirman, where the Aga Khan at that time happened to be residing. The witness, his father and mother, a brother and two sisters, with a party of about 100 other Khoja pilgrims, sailed from Bombay to Bunder Abbas, a port on the Persian coast, near the outlet of the Persian Gulf. They had offerings with them, in money and rich stuffs, to the value of about 2000 sterling. They stayed some time at Bunder Abbas, waiting for other Khojas to collect them from other quarters before starting on their tedious and somewhat perilous journey of 21 days across the mountain ranges of southern Persia from Bunder Abbas to Kirman. At length, about 500 Khojas having collected from all parts at Bunder Abbas, the caravan was formed and they made their way to Kirman. There they were lodged, at the expenses of the Imam, in a large rude building, built round three sides of a great open court. They stayed in Kirman about a month or six weeks, during which period, having first made their offerings, they were admitted ten or twelve times to the presence of the Imam." The Aga Khan, says the witness, "sat on his musnud (seat), we beheld his face, kissed his hand, and retired."