Yezidis came into contact with the Ottomans for the first time in the early 16th century and lived as semi-independent entities under the Ottoman Empire. The Ottomans had conquered Kurdish regions and installed their own governors in Diyarbekir, Urfa, Shingal and Mosul. In 1516 AD, Sultan Selim the Grim launched an invasion into Syria, capturing Aleppo and Damascus from the Mamluks of Egypt. The chief of the Kurds in Aleppo was Qasim Beg, he had long been at odds with the Mamluks who wished to install Sheikh Izz ed-Din, a Yezidi, in his stead. Despite Qasim Beg paying homage to the Sultan, Sheikh Izz ed-Din was still able to have himself named the Emir of the Kurds after persuading the local Ottoman governors to execute Qasim Beg for treason. However, due to Sheikh Izz ed-Din leaving no heirs after his death, the title was returned to the family of Qasim Beg.