Meanwhile, in 1028 one of the governing circle, ʻAlī ibn Ahmad Jarjarai, was able to eliminate his colleagues and take over the office of vizir, which he managed to retain until 1045. He enjoyed good relations with the Byzantine Empire, even though the suzerainty over Aleppo was constantly disputed, occasionally coming to arms. To improve relations with Byzantium and the Christian subjects of the realm, the rebuilding of the Church of the Holy Sepulchre, destroyed in 1009, was authorised under his caliphate in a treaty with the Byzantine Emperor Romanus III. Actual building work, funded by the Byzantines, was not undertaken until 1042.
