In the first half of the 8th century CE, a series of battles took place between the Umayyad Caliphate and the Indian kingdoms; resulted in Umayyad campaigns in India checked and contained to Sindh.[66][lower-alpha 1] Around the 10th century, Muslim Central Asian nomadic empire, the Ghaznavids, under Mahmud of Ghazni (971 - 1030 CE), was the second, much more ferocious invader, using swift-horse cavalry and raising vast armies united by ethnicity and religion, repeatedly overran South Asia's north-western plains. Eventually, under the Ghurids, the Muslim army broke into the North Indian Plains, which lead to the establishment of the Islamic Delhi Sultanate in 1206 by the slaves of the Ghurid dynasty.[67] The sultanate was to control much of North India and to make many forays into South India. However, internal squabbling resulted in the decline of the sultanate, and new Muslim sultanates such as the Bengal Sultanate in the east and the Deccan sultanates in the southern territory breaking off.[68] In 1339, Shah Mir became the first Muslim ruler of Kashmir, inaugurating the Salatin-i-Kashmir or Shah Mir dynasty.[69]