Kurdish emirates and tribes continued to have military power. Both the Mongols' Ilkhanate in Iran and the Mamluk Sultanate in Egypt tried to use Kurds as allies, because many Kurds lived in the mountains on the border between the Mongol Ilkhanate and the Mamluk Sultanate. The Ilkhanate government gave authority to some Kurdish rulers among the tribes. The Sultanate gave authority to an officer with the title "Generalissimo of the Kurds" (). Kurdistan became part of the Timurid Empire in the time of Timur, but after Timur died in 1404, the Timurid dynasty started to lose control of the country. The Qara Qoyunlu took control of the Kurdish emirates around Bitlis, Siirt, and Hasankeyf before 1450. By that time, the Kurds around Diyarbakır were controlled by the Aq Qoyunlu. In 1460 the Aq Qoyunlu attacked and took control of Siirt and Hasankeyf. Then they took control of Cizre (the emirate of Bohtan), Bitlis, and Hakkari.