The Principality of Aleppo was for the most part a loyal tributary to the Sultanate of Grand Seljuk ruled from 1086-1094 by Tutush I, a junior member of the Seljuk line. The death of Tutush coincided with the death of Seljuk Sultan Malik Shah, which precipitated the first fragmentation of Seljuk lands.
Malik Shah's successors concentrated hard on keeping close control over the provinces that mattered: Armenia, Mesopotamia, Persia and the Turkistan plains. Provinces further west, namely Syria and Eastern Turkey, were more or less left to their own devices. Consequently in Aleppo there remained little choice other than for an independent Seljuk principality to spring up. This duly happened, but not without fierce infighting amongst the potentates for the throne.
The area governed by Tutush on his death was immense, stretching from Marash and Turbessel in the North down to the fortress of Kerak. The border with the Byzantines was strangely quiet - any points of friction between Muslim and Christian were for the most part further north, which gave the area some peace. Following Tutush's death, however, his authoritarian son Ridwan seized power in Aleppo and killed two of his brothers. The third, Duqaq, fled to Damascus, Syria's second city, throwing himself upon the mercy of the commune that ruled it in Tutush's name. The principal emir, Khwaresmi, was inclined to follow any course that would gain his city full independence from Aleppo. Hence, there was a formal declaration of war between the two cities.
Unlike in OTL, Aleppo was not threatened by invasion from other quarters. The coalition formed by the Damascus government was loose, consisting of Damascus itself, the Zangid emir Aq Sunqur - a former enemy of Tutush - and a token force from the Byzantines, which made a pass at Aleppo's environs but ultimately retired. Here, Ridwan played a double game - he bought off the Byzantines with the promise of the fortresses of Kerak and Shawbek and the Golan Heights, in return for further neutrality. On his side, he also had enlisted the support of the Ortoqid Princes and a division of troops from the Ummayad Caliphate.
There was never a lot of hope for Duqaq's newfound principality. Whilst the elderly Prince Ortoq held Aq Sunqur in play to the north of Aleppo, Ridwan swept down through Syria, crushing the Damascene vanguard at the Horns of Hama and then taking on the main army at Baalbek. Duqaq and Khwaresmi did not force a fight - they withdrew to the environs of their city, a sensible manouevre, since they avoided being taken in the flank by the princes Soqman and Ilghazi. However, Damascus was not easily defensible - and the citisens were still less easy to convince of the merits of Duqaq's situation. Rather than risk the loss of commerce to pillage and siege, the commune agreed to hand Duqaq, Khwaresmi and the other collaborators over to Ridwan's approaching force. They were executed on the spot - and the city was spared. Ridwan entered the city in triumph in March 1095. The Principality of Aleppo was, for the moment, a consolidated state.
War with the Sons of Ortoq
The year 1095 was uneventful. The death of Prince Ortoq at the end of the year left the two brothers Soqman and Ilghazi in possession of the Ortoqid heartland, centred around the cities of Mardin, Raqqa and Harran. With Ilghazi in command from Mardin in the north and Soqman operating from Harran in the south, the domain was swiftly and bloodlessly divided.
In 1096 the brothers decided to expand their domains. It was agreed that the two brothers would combine their forces in this venture. Their first target was the Principality of Aleppo.