The rulers of the Ottoman Empire were also Sunni Muslims, and they became the enemies of the Safavid Empire. At that time, the Ottoman Empire gave better treatment to Sunni Muslim Kurds than did the Safavid Empire. Kurdistan was part of the Safavid Empire. The Ottoman sultan, Selim I, started an invasion of Kurdistan. The armies of Sultan Selim overcame the armies of Shah Ismail at the Battle of Chaldiran in 1514. The Ottoman Empire took control of the western part of Kurdistan. The majority of Kurdistan became part of the Ottoman Empire, but the eastern part continued to be a part of the Safavid Empire.