of Ghaznevid territory under his control and ending the Ghaznavid Empire. Muhammad Ghori returned to Lahore after 1200 to deal with a revolt of the Rajput Ghakkar tribe in the Punjab. He suppressed the revolt, but was killed during a Ghakkar raid on his camp on the Jhelum River in 1206. Muhammad Ghori's successors established the first Indo-Islamic dynasty, the Delhi Sultanate. The Mamluk Dynasty, (mamluk means "slave" and referred to the Turkic slave soldiers who became rulers throughout the Islamic world), seized the throne of the Sultanate in 1211. Several Turko-Afghan dynasties ruled their empires from Delhi: the Mamluk (1211–1290), the Khalji (1290–1320), the Tughlaq (1320–1413), the Sayyid (1414–1451) and the Lodhi (1451–1526). Although some kingdoms remained independent of Delhi – in Gujarat, Malwa (central India), Bengal and Deccan – almost all of the Indus plain came under the rule of these large Indo-Islamic sultanates. Perhaps the greatest contribution of the sultanate was its temporary success in insulating South Asia from the Mongol invasion from Central Asia in the 13th century; nonetheless the sultans eventually lost Afghanistan and western Pakistan to the Mongols (see the Ilkhanate Dynasty). Mughal Empire From the 16th to the 19th century, the formidable Mughal empire covered much of India. In 1739, the Persian emperor Nader Shah invaded India, defeated the Mughal Emperor Muhammad Shah, and occupied most of Balochistan and the Indus plain. After Nadir Shah's death, the kingdom of Afghanistan was established in 1747 by one of his generals, Ahmad Shah Abdali, and included Kashmir, Peshawar, Daman, Multan, Sindh and Punjab. In the south, a succession of autonomous dynasties (the Daudpotas, Kalhoras and Talpurs) had asserted the independence of Sind, from the end of Aurangzeb's reign. Most of Balochistan came under the influence of the Khan of Kalat, apart from some coastal areas such as Gwadar, which were ruled by the Sultan of Oman. The Sikh Confederacy (1748–1799) was a group of small states in the Punjab that emerged in a political vacuum created by rivalry between the Mughals, Afghans and Persians. The Confederacy drove out the Mughals, repelled several Afghan invasions and in 1764 captured Lahore. However, after the retreat of Ahmed Shah Abdali, the Confederacy suffered instability as disputes and rivalries emerged. The Sikh empire (1799–1849) was formed on the foundations of the Confederacy by Ranjit Singh who proclaimed himself "Sarkar-i-Wala", and was referred to as the Maharaja of Lahore. His