Treaty of Gulistan
24 Oct 1813, Gulistan
Signed after the war of 1804–1813 with Russia. The signatories were Mirza Abolhassan Khan Ilchi and Nikolai Rtishchev; Sir Gore Ouseley mediated. Iran ceded Dagestan, eastern Georgia, the khanates of Baku, Shirvan, Derbent, Karabakh, Ganja, Shaki and Quba, and part of Talysh. Russia alone was given the right to keep a war fleet on the Caspian Sea.
The text was ambiguous, and that ambiguity set the stage for the second war (1826–1828).
Source: en.wikipedia.org