Gyumri has been populated since at least the third millennium BC. The area was mentioned as Kumayri in the historic Urartian inscriptions dating back to the 8th century BC. Kumayri may be identical with the city of Gymnias or Gumnias mentioned by Xenophon in his Anabasis. At the decline of the Urartu Kingdom by the second half of the 6th century BC, Kumayri became part of the Achaemenid Empire. The remains of a royal settlement found just to the south of Gyumri near the village of Beniamin dating back to the 5th to 2nd centuries BC, are a great example of the Achemenid influence in the region. 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. Medieval period 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 center 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.