The Artuqid dynasty (alternatively Artukid, Ortoqid, or Ortokid; Artuklu Beyliği, Artuklular, pl. Artukoğulları; Artykly begligi, Artykogullary; Artuklu bəyliyi, Artıqlılar) was a Sunni Muslim Turkoman dynasty originated from Döğer tribe that ruled in eastern Anatolia, Northern Syria and Northern Iraq in the eleventh through thirteenth centuries. The Artuqid dynasty took its name from its founder, Artuk Bey, who was of the Döger branch of the Oghuz Turks and ruled one of the Turkmen beyliks of the Seljuk Empire. Artuk's sons and descendants ruled the three branches in the region: Sökmen's descendants ruled the region around Hasankeyf between 1102 and 1231; Ilghazi's branch ruled from Mardin and Mayyafariqin between 1106 and 1186 (until 1409 as vassals) and Aleppo from 1117–1128; and the Harput line starting in 1112 under the Sökmen branch, and was independent between 1185 and 1233.
The dynasty was founded by Artuk, son of Eksük, a general originally under Malik-Shah I and then under the Seljuk emir of Damascus, Tutush I. Tutush appointed Artuk governor of Jerusalem in 1086. Artuk died in 1091, and was succeeded by his sons Sökmen and Ilghazi who were expelled from Jerusalem by the Fatimid vizier al-Afdal Shahanshah in 1098; the Fatimids lost the city to the Crusaders the following year after the siege of Jerusalem of 1099.
Sökmen and Ilghazi established themselves in Diyarbakır, Mardin, and Hasankeyf in al-Jazira where they came into conflict with the Seljuk sultanate. Sökmen, bey of Mardin, defeated the Crusaders at the Battle of Harran in 1104. Ilghazi succeeded Sökmen in Mardin and imposed his control over Aleppo at the request of the qadi Ibn al-Khashshab in 1118. The next year, Ilghazi defeated the Crusader state Principality of Antioch at the Battle of Ager Sanguinis of 1119.
After pillaging the County of Edessa, Ilghazi made peace with the crusaders. In 1121, he went north towards Armenia with his son-in-law Mazyad Dubais II ibn Sadaqah and Sultan Malik of Ganja.