Timur began a campaign westwards in 1380, invading the various successor states of the Ilkhanate. By 1389, he had removed the Kartids from Herat and advanced into mainland Persia where he enjoyed many successes. This included the capture of Isfahan in 1387, the removal of the Muzaffarids from Shiraz in 1393, and the expulsion of the Jalayirids from Baghdad. In 1394–95, he triumphed over the Golden Horde, following his successful campaign in Georgia, after which he enforced his sovereignty in the Caucasus. Tokhtamysh, the khan of the Golden Horde, was a major rival to Timur in the region. He also subjugated Multan and Dipalpur in modern-day Pakistan in 1398. Timur gave the north Indian territories to a non-family member, Khizr Khan, whose Sayyid dynasty replaced the defeated Tughlaq dynasty of the Sultanate of Delhi. Delhi became a vassal of the Timurids but obtained independence in the years following the death of Timur. In 1400–1401 he conquered Aleppo, Damascus and eastern Anatolia, in 1401 he destroyed Baghdad and in 1402 defeated the Ottomans in the Battle of Ankara. This made Timur the most preeminent Muslim ruler of the time, as the Ottoman Empire plunged into civil war. Meanwhile, he transformed Samarkand into a major capital and seat of his realm.