The territory of Arran became a part of the Seljuq Empire, followed by the Ildegizid state. It was taken briefly by the Khwarizmid dynasty and then overran by Mongol Hulagu empire in the 13th century. Later, it became a part of Chobanid, Jalayirid, Timurid, and Iranian Safavid, Afsharid, and Qajar states which means at least from 1500 until 1828, when Iran lost a major battle to the expanding Russian Empire and as a result had to sign the Treaty of Turkmenchay (Russian: Туркманчайский договор, Persian: عهدنامه ترکمنچای‎) in which it had to concede all the Caucasus territories to Russia.