The most marked instance of the political involvement of the Shia ulema during this period was in the case of the first Perso-Russian War (1804-1813) in the Caucasus, which had been intermittent from about 1804, and resumed in 1811. Abbas Mirza, the son of Fateh Ali Shah was conducting the campaign, turned to the ulema of Iraq and Ispahan to issue fatwa, declaring the encounter against Russia to be holy war (jihad). Many of the prominent ulema, such as Shaikh Jafar Kashiful Gitta (d. 1227/1812) and Ahmad Naraqi (d. 1245/1829), responded to this appeal and stirred up hootest agitation. In 1812, the Iranian army defeated the Russians at Qarabagh. Russian forces were reinforced, crossed the Aras river, and defeated the Iranians at Aslanduz.
The first Perso-Russian War was consequently ended in defeat of Iran, and the Treaty of Gulistan in 1228/1813 stripped Iran of all the Caucasian provinces, such as Georgia, Darband, Baku, Shirwan, Shaki, Ganja, Qarabagh, Mughan and part of Talish. This war had considerably depleted the resources of Iran. A number of disorders broke out; and the Afghans also engineered a rebellion in Khorasan in 1813. There was also repeated chaotic condition on the Turkish frontier, but war did not break out until 1821. It however lasted until 1823 when it was concluded by the treaty of Erzurum.
The ulema class however continued to employ effectively the tactics of obstructionism in the Iranian politics, and emphatically agitated for another holy war against Russia. In 1825, the Russian governor-general of Georgia occupied Gokcheh, the principal disputed district with a military force. Fateh Ali Shah was reluctant but when in 1826 he set out for his summer residence in Sultaniyya, he was followed there by Aqa Sayed Muhammad Tabataba, Ahmad Naraqi (d. 1245/1829), Muhammad Taqi Baraghani (d.1230/1847) and other prominent ulema; demanded that Fateh Ali Shah should declare war on Russia. They threatened to take control of the affairs of government if Fateh Ali Shah would refuse to declare holy war. They issued fatwas, declaring the war to be obligatory and opposition to it a sign of unbelief (kufr).
The king was pressed into acquiescing, and the war broke out in 1826. Iran gained initial success, recovering most of the territories ceded by the treaty of Gulistan. The Russian forces were reinforced with latest weapons. The ulema imparted to the Iranian soldiers, who had inferior weapons, to recite Sura Yasin of Holy Koran in the battlefield, to cause their enemies blind. The Russians inflicted a series of severe defeats on the Iranian army. They advanced rapidly and Tabriz was first to be fallen, and various discontented leaders in Azerbaijan went over to the Russian side. The outcome of this second Perso-Russian War was as disastrous as the first. Negotiations for peace began in November, 1827, and a treaty was signed on February 21, 1828 at Turkomanchay. As the result of the Treaty of Turkomanchay, Erivan and Nakhchivan and a large indemnity were ceded by Iran. Saiyid Athar Abbas Rizvi writes in "Iran - Royalty, Religion and Revolution" (Canberra, 1980, p. 95) that, "Thus the war-mongering bureaucrates forced upon Iran a war with Russia which ended with the even more humiliating treaty of Turkomanchay in 1828."
The state over which Fateh Ali reigned had much in common with the earliest kingdoms of the Seljuqs, the Ilkhanids, the Taymurids and the Safavids. After the Perso-Russian Wars, Fateh Ali lost large part of the Iranian territories.
In India, the Mughal empire was declining, and the British dominated the whole country. After Shah Alam II (1759-1806), the next rulers were Akbar Shah (1807-1837) and Bahadur Shah II (1837-1857), the last ruler, who had taken part in the Independence War of 1273/1857, the last struggle on the part of the masses in India to throw off the foreign yoke. But it failed miserably and, on the charge of engineering revolt, the last Mughal ruler was exiled by the British to Rangoon, where he died in extreme penury on 1278/1862. Neither the Muslims nor the Hindus were destined in India to build lasting kingdom on the ruins of the Mughal empire.