During the course of the Arab–Byzantine wars, exchanges of prisoners of war became a regular feature of the relations between the Byzantine Empire and the Abbasid Caliphate. The exchanges began in the late 8th century and continued until the late 10th century. Most of them took place at the Lamos River in Cilicia, on the border between the two powers.
Centuries of war between the Byzantine Empire and the Arab Caliphate had led to degree of a mutual understanding, respect, and a regular pattern of diplomatic and cultural exchanges between the two powers. This is evidenced for instance in the protocols for the imperial receptions at the Byzantine court, where the "Eastern Muslims" are accorded the first place immediately after any ecclesiastical officials, enjoying precedence over the Bulgarians or the Franks, but also by the humane treatment of prisoners of war by both sides. On the Byzantine side, Arab prisoners were usually paraded in triumphal processions but otherwise generally well treated. Senior figures were state prisoners and honoured guests for the duration of their captivity, being regularly invited to attend races at the Hippodrome or imperial banquets at the Great Palace and given gifts as part of imperial ceremonies. The rank and file on the other hand were usually sold off as slaves or kept in prison until they were ransomed or exchanged. Most were employed as labour force, and although some might be induced to convert to Christianity, in which case they were given lands to settle, otherwise they enjoyed the freedom to worship at mosques of their own. Al-Muqaddasi noted that although the Arab captives were made to work as slaves, they could earn money, and that the Byzantines "do not force any of them to eat pork, and they do not slit their noses or their tongues".