Treaty of Gulistan
Following their defeat by Russia in the Russo-Persian War of 1803–13, Qajar Persia was forced to sign the Treaty of Gulistan in 1813, which acknowledged the loss of the territory to Russia. Local khanates were either abolished (like in Baku or Ganja) or accepted Russian patronage.