 A fourth, the County of Tripoli, was established in 1109.Edessa was the most northerly of these, and also the weakest and least populated; as such, it was subject to frequent attacks from the surrounding Muslim states ruled by the Ortoqids, Danishmends and Seljuq Turks.Count Baldwin II and future count Joscelin of Courtenay were taken captive after their defeat at the Battle of Harran in 1104.