 Beyond these to the north and west lay the states of Armenian Cilicia and the Byzantine Empire, with which Jerusalem had a close relationship in the twelfth century.Further east, various Muslim emirates were located which were ultimately allied with the Abbasid caliph in Baghdad.The fragmentation of the Muslim east allowed for the initial success of the crusade, but as the 12th century progressed, the kingdom's Muslim neighbours were united by Nur ad-Din and Saladin, who vigorously began to recapture lost territory.