The smaller building to the north has been identified as the Jawsaq al-Khaqani, which served as the private residence of the caliph. Construction of the Jawsaq palace was entrusted by al-Mu'tasim to the Turk Khaqan 'Urtuj, the father of al-Fath ibn Khaqan and Muzahim ibn Khaqan. It was located within an enclosure wall, and on the eastern side was a ''maydan'' or square which overlooked the beginning of a racecourse in al-Hayr. During the violent period following the death of al-Mutawakkil, the Jawsaq palace is frequently mentioned as serving as a prison for prominent persons; al-Mu'tazz, al-Mu'ayyad, al-Muwaffaq, al-Muhtadi, and al-Mu'tamid all were incarcerated there at various points in time.