However, at the beginning of the 5th century BC, Kumayri became part of the Satrapy of Armenia under the rule of the Orontids. An alternative theory suggests that Kumayri has been formed as an urban settlement in the late 5th century BC, ca. 401 BC, by Greek colonists. Later in 331 BC, the entire territory was included in the Ayrarat province of Ancient Armenian Kingdom as part of the Shirak canton. Between 190 BC and 1 AD Kumayri was under the rule of the Artaxiad dynasty of Armenia. During the 1st century AD, Shirak was granted to the Kamsarakan family, who ruled over Kumayri during the Arsacid Kingdom of Armenia. Following the partition of Armenia in 387 between the Byzantines and the Persians, and as a result of the fall of the Arsacid Kingdom of Armenia in 428, Shirak including Kumayri became part of the Sasanian Empire of Persia. In 658 AD, at the height of the Arab Islamic invasions, Kumayri was conquered during the Muslim conquest of Persia to become part of the Emirate of Armenia under the Umayyad Caliphate. Kumayri was a significant and quite-developed urban settlement during the Middle Ages. According to the Armenian scholar "Ghevond the Historian", the town was a centre of the Armenian rebellion led by "Artavazd Mamikonian" against the Islamic Arab Caliphate, between 733 and 755. After 2 centuries of Islamic rule over Armenia, the Bagratids declared independence in 885 establishing the Bagratid Kingdom of Armenia. Kumayri entered e new era of growth and progress, particularly when the nearby city of Ani became the capital of the kingdom in 961. By the second half of the 10th century, Kumayri was under the influence of the Armenian Pahlavuni family, who were descendants of the Kamsarakans. 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 gradullay 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 centre between the east and the west.