The Treaty of Saint Petersburg of 21 September [O.S. 12 September] 1723 concluded the Russo-Persian War (1722-1723) between Imperial Russia and Safavid Iran. It ratified for Iran's forced ceding of its territories in the North Caucasus, South Caucasus, and contemporary mainland Northern Iran, comprising Derbent (Dagestan), Baku, the respective surrounding lands of Shirvan, as well as the provinces of Gilan, Mazandaran, and Astrabad. The treaty further specified that the Iranian king would receive Russian troops for domestic peacekeeping.
As the Cambridge History of Iran states;
"On 23 September 1723, his ambassador in Saint Petersburg, Ismail Beg, signed a humiliating treaty which stipulated that the Tsar would accord the shah friendship and help against rebels and would maintain the shah in tranquil possession of his throne. In return the shah promised to permanently cede to Russia: ... the towns of Darband (Derbent), Baku, with all the territories belonging to them, as well as the provinces: Gilan, Mazandaran, and Astrabad, so that they might support the forces which His Imperial Majesty [the Tsar] will send to help His Shahian Majesty against rebels, without demanding money for it."
The signatory on the Safavid side was the envoy Ismail Beg (or Ismail Bey), who had been sent by king Tahmasp II himself. However, when the treaty arrived in the temporary capital of Qazvin in April 1724, Tahmasp II had not agreed with the negative terms of the treaty, and it was thus therefore not ratified by him, as by then it was clear that the Russians, though having occupied the Iranian territories, were too small to pose a major threat to Iran, even though the latter had been seriously weakened through the frantic events of the early 1720s. This resulted in Ismail Beg being forced to flee punishment upon return, and therefore died in exile in Astrakhan some twenty years later.