Yazd in early times had been known as Kathah, and this name, when the town came to be called more particularly Yazd, had passed to its district, otherwise known as the Hawmah, or Jumah (of Yazd). It is situated between Ispahan and Kirman on the route leading to Baluchistan and Sind. It was well fortified city, with two gates.
In 1230/1815, Khalilullah Ali moved to Yazd. On moving to Yazd, he left behind his wife and children in Kahek to live on the proceeds from the lands in the Mahallat. In 1231/1816, Khalilullah Ali betrothed to the sister of Aga Imam Khan Farahani. Khalilullah Ali also tied his close relation with Haji Zaman Khan, the governor of Yazd. The Ismaili pilgrims henceforward began to trek in Yazd to behold their Imam.
In 1233/1817, a dispute took place between the Ismailis and the local shopkeeper at the main market, and the latter violently lodged complaint to Nawab Mirza Sayed Jafar, the chief of Yazd, who summoned the Ismailis for punishment. These handful Ismailis had taken shelter in Imam's residence. In pursuit, Nawab Mirza demanded to arrest them, but Imam refused, saying, "They have sought asylum at my residence, therefore I cannot remove them from my protection."
Mulla Hussain Yazdi was a cruel and fanatical Shia in Yazd. His friends had created chaotic conditions in Tehran. They had made a mosque in Tehran as a centre of their evil activities. Their objective was to harass the innocent citizens, and relieved through bribes, had they arrested. It seems that Fateh Ali Shah was in need of funds through different means, therefore, he had given liberty to these elements. Many eminent persons had become the victims of the gang of Hussain Yazdi and the event of Yazd also reflects a part of his derogatory activities.
Hussain Yazdi instigated the people and stormed the Imam's residence with a terrorist gang, who pelted stones heavily and broke down its walls. They managed to enter the residence and fought with Imam's handful followers and servants. In the collision, Khalilullah Ali was seriously wounded, resulting his immediate death. The terrorists also gutted the house and took flight.
The news of the death of the Ismaili Imam rapidly spread all over the country within couple of days. In reprisal, the Ismailis took arms and the country was likely being blanketed with the darkest hour, but the emperor Fateh Ali Shah turned the tide. He at once ordered Haji Zaman Khan, the governor of Yazd to arrest Hussain Yazdi and his partisans. The governor soon afterwards arrested them while they were about to flee from the city, and sent them chained in Tehran. Hussain Yazdi was whipped and his friends were imprisoned, who relieved themselves through bribes after restoration of peace.
Khalilullah Ali's body had been taken to Mahallat under the protection of the Qajarid soldiers. His bier was soon taken to Najaf for interment. He had four sons, viz. Hasan Ali Shah, Taki Khan, Sardar Abul Hasan Khan and Sardar Muhammad Bakir Khan; and two daughters, viz. Shah Bibi and Gohar Taj.
With the death of Khalilullah Ali II in 1233/1817, the taqiya practice in the Iranian Ismailis being in force for over five hundred years came to an end, and they came up as a leading Shiite branch of Islam in Iran.