Thereafter, the area was under the successive rule of the Iranian Zands and Qajars. From the late 18th century, Imperial Russia switched to a more aggressive geo-political stance towards its two neighbors and rivals to the south, namely Iran and the Ottoman Empire. Russia now actively tried to gain possession of the Caucasus region which was, for the most part, in the hands of Iran. In 1804, the Russians invaded and sacked the Iranian town of Ganja, sparking the Russo-Persian War of 1804–1813. The militarily superior Russians ended the Russo-Persian War of 1804–1813 with a victory.