was the Shah's warmongering and obduracy. The rebellion was supported by a Safavid descendant called Nawab Safavi, which further encouraged the rebels to kill the city's deputy governor. As a result, between 1838 and 1840, Isfahan was in the hands of insurgents, especially the Lutis, whose numbers were increasing because the city's poor people were joining the Lutis and Shafti's cause. To end their rebellion, Mohammad Shah went to Isfahan with 60,000 troops on the return journey from Herat. It was unprecedented for the shah to take arms against the state's clergy, especially Shafi, who was considered a clergy leader and Isfahan was regarded as the religious capital of Iran. Modern historian Homa Nategh noted this act as a "coup d'état". Upon reaching the city, Mohammad Shah ordered the cannons to bombard Isfahan. Shafti, fearing great losses, opened the city's northern gate and the Lutis deserted from the southern gate. Mohammad Shah triumphantly entered the city and instantly ordered the execution of the remaining Lutis. He could not charge Shafti in any extreme measures but exiled his son to Astrabad. The Luti king Ramazan Shah died while under torture and of his men, 240 were killed and 400 were arrested. Mohammad Shah ordered a court to be set up so that the people could recount Lutis' crimes. Mohammad took the lands and properties Shafti and the Lutis had usurped, and made them part of his demesne lands. Harsh penalties were made to ensure stability and fear, and to prevent future rebellions. Mohammad Shah celebrated his victory greatly, trying to erase the memory of his failure in Herat. To declare Shafti's cause blasphemy, Mohammad Shah adopted the title Ghazi (the warrior of Islam), which was previously given to him for the war with the Russian empire. The Second Treaty of Erzurum Hostilities with the Ottomans and tensions over the borderlands of the two empires were unresolved by the treaty of Erzurum and later led to incidents during Mohammad Shah's reign that pushed him to start a war, such as an incident caused by Ali Reza Pasha, the governor of Baghdad, who sacked the city of Khorramshahr in 1837. Thereafter, the peace over the frontier of Iran and the Ottoman Empire became a prioritized European project in the early 1840s. Negotiations between the two nations began in 1842 in Erzurum, a sizeable frontier town. The Iranian commission included Mirza Taqi Khan Farahani,