Diyar Bakr (Arabic: دِيَارُ بَكرٍ|Diyār Bakr|abode of [[Banu Bakr|Bakr]]) is the medieval Arabic name of the northernmost of the three provinces of the Jazira (Upper Mesopotamia), the other two being Diyar Mudar and Diyar Rabi'a. According to the medieval geographer al-Baladhuri, all three provinces were named after the main Arab tribes that were settled there by Mu'awiya in the course of the Muslim conquests of the 7th century. The Diyar Bakr was settled by the Rabi'a subgroup of the Banu Bakr, and hence the two provinces are sometimes referred to collectively as "Diyar Rabi'a". In later Turkish usage, "Diyar Bakr" referred to the western portion of the former province, around Amid (which hence became known as Diyarbakır in Turkish).
Diyar Bakr encompasses the region on both banks of the upper course of the river Tigris, from its sources to approximately where its course changes from a west-east to a southeasterly direction. Its main city was Amida (Amid in Arabic), and other major settlements included Mayyafariqin, Hisn Kaifa, and Arzan. Geographically and politically, in early Islamic times the Diyar Bakr was usually part of the Jazira, but it was sometimes joined to the Armenian province to the north. In the late 9th century, it was controlled by an autonomous dynasty founded by Isa ibn al-Shaykh al-Shaybani. In the mid-10th century, the region passed into the hands of the Hamdanids, but their rule was contested by the Buyids (978–983) and after that the Marwanids.
The Marwanid emirate ruled the region for almost a century before being annexed by the Seljuk Empire in 1084–1085. Following the Seljuk realm's collapse after the death of Malik-Shah I in 1092, a series of small emirates established itself across the region, with the Artuqids of Mardin the most important among them. In the late 12th century, the province came under Ayyubid control, and in the mid-13th century it was divided between the Ayyubids in the east and the Seljuks of Rum, who controlled the western portion around Amida. Around 1260, the region was conquered by the Mongols, who allowed the local rulers to continue to exercise power as their vassals. In the 14th century, the region was conquered by the Aq Qoyunlu, who disputed control with the Qara Qoyunlu and the last Ayyubid princes. In the early 16th century, it was for a time occupied by the Safavids before coming under Ottoman control in 1516.