Tahmasp II

Tahmasp II (1704? – 11 February 1740) was one of the last Safavid rulers of Persia (Iran).
Biography.
Tahmasp was the son of Sultan Husayn, the Shah of Iran at the time. When Husayn was forced to abdicate by the Afghans in 1722, Prince Tahmasp wished to claim the throne. From the besieged Safavid capital, Isfahan, he fled to Tabriz where he established a government. He gained the support of the Sunni Muslims of the Caucasus (even that of the previously rebellious Lezgins), as well as several Qizilbash tribes (including the Afshars, under the control of Iran's future ruler, Nader Shah). 
Russo-Persian War.
In June 1722, Peter the Great, the then tsar of the neighbouring Russian Empire, declared war on Safavid Iran in an attempt to expand Russian influence in the Caspian and Caucasus regions and to prevent its rival, Ottoman Empire, from territorial gains in the region at the expense of declining Safavid Iran.
The Russian victory ratified for Safavid Irans' cession of their territories in the Northern, Southern Caucasus and contemporary mainland Northern Iran, comprising the cities of Derbent (southern Dagestan) and Baku and their nearby surrounding lands, as well as the provinces of Gilan, Shirvan, Mazandaran, and Astrabad to Russia per the Treaty of Saint Petersburg (1723).
Tahmasp also eventually gained the recognition of both the Ottoman Empire and Russia, each worried about the other gaining too much influence in Iran.
By 1729, Tahmasp had control of most of the country. Quickly after his foolhardy Ottoman campaign of 1731, he was deposed by the future Nader Shah in 1732 in favor of his son, Abbas III; both were murdered at Sabzevar in 1740 by Nader Shah's eldest son Reza-qoli Mirza.