In 1406, the Turkish ruler Kara Yusuf gave some districts in Van to the Mahmudi tribe and established a beylik called 'Mahmudi Beylik' or Mahmudi government. This beylik was tabbi[clarification needed] to Karakoyunlu and Aq Qoyunlu respectively.[3] During the Aq Qoyunlu administration, it was ruled by Hüseyin bey. Supported by Aq Qoyunlu Turkmen, the Mahmudis took Albari (Başkale) and
Shambo districts from the Emirate of Hakkari and with the help of Hakkari Bey Izzettin Şir Bitlis pushed the mahmudis away
Man.[4] During the reign of Mahmudi the Safavid was subordinated to Ismail I, and Ismail I Safavid, son of Ardebil Sheikh, defeated him in the battle he conquered with the Aq Qoyunlu Sultan of 1503, occupying his lands and arresting the Kurdish rulers.
When the Ottomans were victorious in the war of Caldiran, some Kurdish rulers in the region joined the Ottoman Empire. Mahmudi Beys maintained their allegiance to Shah Ismail and later to Shah Tahmasp. During the first Iranian expedition in 1533, ıvaz Bey became a Safavid eTabi after the rule of the Ottoman ruler
Suleiman the Magnificent. In 1537, after the death of Ivaz Bey's son Hamza Bey, Tahmasp I appointed Hasan Bey as the head of the Mahmudis.[5]
When the Ottomans organized an expedition to the region in 1548, this beylik certainly joined the Ottomans when the reigning Mahmudi ruler, Hasan Bey converted from Yazidism to Islam[6] and the beylik became subordinated to the Ottomans. Hosap Castle, which was occupied by Safavids in 1604, was built by Süleyman Bey in 1643. The castle gate has its own inscriptions.[7][8]Turkish traveler Evliya Çelebi describes Hosap Castle and the Mahmudi government in the mid-17th century. Regarding Mahmudi government, he says: "They are all soldiers with six thousand swords. This is the land of the nobility and there is only one Choogoog Mountain. In a country called Ibrahim Bey. These Mahmudis have entered the fire of tribute and there are tribes of timar and zema. 120 tribes." After Evliya Çelebi's account, in 1829, the Mahmudi principality came to an end when Müküs Emir Han Mahmud and other Kurdish lords seized Hosap Castle through a bloody siege.[9]