in a year. At the turn of the 7th century the Albanian marzpanate broke up into several smaller principalities. In the south, Artsakh and Utik formed an Armenian principality under the Aranshakhiks. In the 7th century the Migranians or Mihranids replaced the Aranshakhiks. A dynasty of Persian origin, they became associated with the Aranshakhiks, turned to Christianity and Armenicized. In the 7th and 8th centuries a distinctive Christian culture took shape. The monasteries at Amaras, Orek, Katarovank, Djrvshtik and others acquired a significance that transcended the local area and spread across Armenia. Armenian princedoms of Dizak and Khachen From the beginning of the 9th century, the Armenian princely houses of Khachen and Dizak were storing up strength. In 821, Amaras was plundered by Arab invaders, then restored by an opponent of the Caliphate—Yesai Arranshahik (Armenian: , Yesai Abu-Muse in Arabic sources), ruler of Dizak, whose battle against invaders and restoration of Amaras are told in Tovma Artsruni's 9th century ‘’History of the House of Artzrunik.’’ The prince of Khachen, Sahl Smbatean, clashed with Arab invaders beginning in 822, when they invaded Amaras. In the medieval period architecture flourished, particularly religious buildings such as the Church of Hovanes Mkrtich (John the Baptist) and its vestibule at the Gandzasar Monastery, built 1216–1260; the ancient residence of the Catholicos of Albania, best known among scholars for its richly decorated dome, the Dadivank Monastery Cathedral Church (1214), and the Gtichavank cathedral (1241–1248). These churches are considered masterpieces of Armenian architecture. Seljuks, Mongols and Safavids In the 11th century the Seljuk invasion swept the Middle East, including Transcaucasia. Nomadic Oghuz Seljuk tribes that came with this invasion became a dominant constituent of the ancestry of modern Azerbaijanis. From then until the beginning of the 20th century these tribes used mountainous Karabakh as their summer pastures, where they stayed for four or five of the warmer months of the year, and in fact owned the region. In the 12th and 13th century the Armenian Zakarian dynasty took control over the Khachen, but its sovereignty was brief. For 30–40 years of the 13th century the Tatar and Mongols conquered Transcaucasia. The efforts of the Artsakh-Khachen prince Hasan-Jalal succeeded in partially saving the land from destruction. However after his death in 1261, Khachen did become subject to Tatars and Mongols. The situation became still worse in the 14th century when the subsequent Turkic federations, the Qara Koyunlu and