Fath Ali Shah launched the Russo-Persian War of 1804 to 1813 to halt Russian incursions into the Caucasus region, traditionally under Persian dominion. The war did not go well for Persia, and under the terms of the 1813 Treaty of Gulistan, the Qajar rulers had to cede Azerbaijan, Dagestan, and eastern Georgia to the Romanov Tsar of Russia. A second Russo-Persian War (1826 to 1828) ended in another humiliating defeat for Persia, which lost the rest of the South Caucasus to Russia.