Armenia remained under Arab rule for approximately 200 years, formally starting in 645 CE. Through many years of Umayyad and Abbasid rule, the Armenian Christians benefited from political autonomy and relative religious freedom, but were considered second-class citizens (dhimmi status). This was, however, not the case in the beginning. The invaders first tried to force the Armenians to accept Islam, prompting many citizens to flee to Byzantine-held Armenia, which the Muslims had largely left alone due to its rugged and mountainous terrain. The policy also caused several uprisings until the Armenian Church finally enjoyed greater recognition even more than it experienced under Byzantine or Sassanid jurisdiction. The Caliph assigned Ostikans as governors and representatives, who sometimes were of Armenian origin. The first ostikan, for example, was Theodorus Rshtuni. However, the commander of the 15,000-strong army was always of Armenian origin, often from the Mamikonian, Bagratuni or Artsruni families, with the Rshtuni family having the highest number of troops at 10,000. He would either defend the country from foreigners, or assist the Caliph in his military expeditions. For example, the Armenians helped the Caliphate against Khazar invaders.