Between 771 and 772, the Abbasid caliph al-Mansur built a garrison city about  to the west of Raqqa for a detachment of his army. It was named al-Rāfiqah, "the companion", whose city wall is still visible.