Cilicia fell to Arab invasions in the seventh century and was entirely incorporated into the Rashidun Caliphate. However, the Caliphate failed to gain a permanent foothold in Anatolia, as Cilicia was reconquered in the year 965 by Byzantine Emperor Nicephorus II Phocas. The Caliphate's occupation of Cilicia and of other areas in Asia Minor led many Armenians to seek refuge and protection further west in the Byzantine Empire, which created demographic imbalances in the region. In order to better protect their eastern territories after their reconquest, the Byzantines resorted largely to a policy of mass transfer and relocation of native populations within the Empire's borders. Nicephorus thus expelled the Muslims living in Cilicia, and encouraged Christians from Syria and Armenia to settle in the region. Emperor Basil II (976–1025) tried to expand into Armenian Vaspurakan in the east and Arab-held Syria towards the south. As a result of the Byzantine military campaigns, the Armenians spread into Cappadocia, and eastward from Cilicia into the mountainous areas of northern Syria and Mesopotamia.