In 252/3 Albania, along with
Iberia and
Armenia, was conquered and annexed by the
Sasanian king
Shapur I (). Albania retained its monarchy, although the king had no real power and most civil, religious, and military authority lay with the Sasanian
marzban ("
margrave") of the territory. In 297 the
Treaty of Nisibis stipulated the re-establishment of the Roman protectorate over Iberia, but Albania remained an integral part of the Sasanian Empire. In the middle of the 4th century the king of Albania,
Urnayr, arrived in Armenia and was baptized by
Gregory the Illuminator, but Christianity spread in Albania slowly, and the Albanian king remained loyal to the Sasanians. After the partition of Armenia between Byzantium and Iran (387), Albania with Sasanian help was able to seize from Armenia the entire right bank of the river Kura up to the river
Araxes, including Artsakh and Utik. The Sasanian king
Yazdegerd II passed an edict requiring all the Christians in his empire to convert to
Mazdaism, fearing that Christians might ally with Roman Empire, which had recently adopted Christianity. This led to rebellion of Albanians, along with Armenians and Iberians. However, the Albanian king Vache, a relative of Yazdegerd II, converted to the official religion of the Sassanian empire, but quickly reverted to Christianity. In the middle of the 5th century by the order of the Sasanian king
Peroz I Vache built in Utik the city initially called Perozabad, and later Partaw and
Barda, and made it the capital of Albania. The seat of the Albanian Catholicos was also transferred to Partaw, as well as the
marzban. After the death of Vache, Albania remained without a king for thirty years. The Sasanian
Balash reestablished the Albanian monarchy by making Vachagan, son of Yazdegerd and brother of the previous king Vache, the king of Albania. By the end of the 5th century, the ancient ruling dynasty of Albania was replaced by princes of the
Parthian
Mihranid family, who claimed descent from the Sasanians. They assumed the title of "Arranshah" (i.e.
shah of Arran, the Iranian name of Albania). The ruling dynasty was named after its founder Mihran, who was a distant relative of the Sasanians. The Mihranid dynasty survived under Muslim suzerainty until 821-2. In the late 6th – early 7th centuries AD the territory of Albania became an arena of wars between Sassanian Iran,
Byzantium and
Khazar kaganate, the latter two very often acting as allies. During the
Third Perso-Turkic War, the Khazars invaded Albania, and their leader
Ziebel declared himself lord of Albania, levying a tax on merchants and the fishermen of the Kura and Araxes rivers, which was "in accordance with the land survey of the kingdom of Persia". The Albanian kings retained their rule by paying tribute to the regional powers. Albania was later conquered by the Arabs during the
Islamic conquest of Persia. ==Politics and organization==