As vizier of Fatimid Egypt, Shawar served under the caliph al-Adid, a young man of about sixteen or seventeen who had endured a dreadfully turbulent childhood. His father had been murdered by Nasr al-Din and Abbas, and his older brother, al-Fa’iz, had ruled briefly before dying as a child.

