 The early Safavids, who were followers of the Safaviyya religious order, began to undermine the allegiance of the Aq Qoyunlu.The Safavids and the Aq Qoyunlu met in battle in the city of Nakhchivan in 1501 and the Safavid leader Ismail I forced the Aq Qoyunlu to withdraw.In his retreat from the Safavids, the Aq Qoyunlu leader Alwand destroyed an autonomous state of the Aq Qoyunlu in Mardin.