The Byzantines, who had adopted an anti-Khazar foreign policy, involved the Alans in a war against the Khaganate during the reign of the Khazar ruler Aaron II, probably the early 920s. In this war the Alans were defeated and their king captured. According to Muslim sources such as al-Mas'udi (943/56), the Alans abandoned Christianity and expelled the Byzantine missionaries and clergy roughly contemporaneously with these events. Aaron's son married the daughter of the Alan king and Alania was re-aligned with the Khazars, remaining so until the collapse of the Khaganate in the 960s.