Gujarat, a region in western India, fell under Delhi Sultanate following repeated expeditions under Alauddin Khalji around the end of the 13th century. He ended the rule of Vaghela dynasty under Karna II and established Muslim rule in Gujarat. Soon the Tughluq dynasty came to power in Delhi whose emperor carried out expeditions to quell rebellion in Gujarat and established their firm control over the region by the end of the century. Following Timur's invasion of Delhi, the Delhi Sultanate weakened considerably so the last Tughluq governor Zafar Khan declared himself independent in 1407 and formally established Gujarat Sultanate.