The Pahlavunis had a great contribution in the progress of Shirak with the foundation of many fortresses, monastic complexes, educational institutions, etc. After the fall of Armenia to the Byzantine Empire in 1045 and later to the Seljuk invaders in 1064. Under the foreign rulers, the town had gradually lost its significance during the following centuries, until the establishment of the Zakarid Principality of Armenia in 1201 under the Georgian protectorate. During the Zakarid rule, the Eastern Armenian territories, mainly Lori and Shirak, entered into a new period of growth and stability, becoming a trade center between the east and the west. After the Mongols captured Ani in 1236, Armenia turned into a Mongol protectorate as part of the Ilkhanate, and the Zakarids became vassals to the Mongols. After the fall of the Ilkhanate in the mid-14th century, the Zakarid princes ruled over Lori, Shirak, and Ararat plain until 1360 when they fell to the invading Turkic tribes. By the last quarter of the 14th century, the Ag Qoyunlu Sunni Oghuz Turkic tribe took over Armenia, including Shirak. In 1400, Timur invaded Armenia and Georgia, and captured more than 60,000 of the survived local people as slaves. Many districts including Shirak were depopulated. In 1410, Armenia fell under the control of the Kara Koyunlu Shia Oghuz Turkic tribe. According to the Armenian historian Thomas of Metsoph, although the Kara Koyunlu levied heavy taxes against the Armenians, the early years of their rule were relatively peaceful and some reconstruction of towns took place. Under the rule of the Turkic tribes, Kumayri was known to the Turks as Gümrü. Persian and Russian rules In 1501, most of the Eastern Armenian territories including Kumayri were conquered by the emerging Safavid dynasty of Iran led by Shah Ismail I. Soon after in 1502, Kumayri became part of the newly formed Erivan Beglarbegi, a new administrative territory of Iran formed by the Safavids. During the first half of the 18th century, Kumayri became part of the Erivan Khanate under the rule of the Afsharid dynasty and later under the Qajar dynasty of Persia. In June 1804, the Russian forces controlled over Shirak region at the beginning of the Russo-Persian War of 1804 and 1813. Kumayri became officially part of the Russian Empire at the Treaty of Gulistan signed on 1 January 1813 between Imperial Russia and Qajar Persia. During the period of Russian rule, Gyumri