After Mahmud of Ghazni the next invader in India was Muhammad Ghori, whose royal title was Mu'izzuddin. As a prince, he was known as Shahab-ud-din. He belonged to the Ghorid dynasty which replaced the Ghaznavids in Afghanistan. He assisted his elder brother Ghiyas-ud-din and remained a loyal subordinate until his death in 1202 and became the ruler of his empire and ruled until his assassination in 1206. His dynasty is known as Ghori because his family belonged to the territory of Ghor in Afghanistan.
After the death of Mahmud of Ghazni, for nearly hundred and fifty years there was no Turkish invasion in India. Shahab-ud-din Ghori's first invasions were on the Muslim states of Multan and the fortress of Uch.
In 1179, he attacked Gujrat but was defeated by its raja. His next attack was on Lahore in 1181, which was a successful one and this ultimately ended the Ghaznavids Empire, bringing the remaining territory under Ghori's control.
In 1191 he fought against Prithviraj Chauhan, who was the ruler of Delhi, Ajmer and its allies, and was one of the most powerful rajas of India; Ghori was defeated in this battle which is called the first battle of Tarain 1191.
However, he was not dishearten and prepared his army for the next attack — this time with much strategy and power. His efforts made him defeat Prithviraj Chauhan in the second battle of Tarain, 1192. The victory paved the way for Ghori to push Muslim rule further in India.
After Prithviraj's death, there was no strong and brave ruler who could fight and hold back Turkish invasions with such great valour as that of Prithviraj's.
Ghori treated his slaves very nicely and sometimes with as much affection as a father would have for his son. One of his slaves was Qutb-ud-din Aibak. With the time, he rose through the ranks to become the most trusted general of Ghori. His greatest military successes occurred while working directly under Ghori's leadership. He was left with independent charge of Indian campaigns and thus became the first Muslim emperor of Northern India. He also established Turkish rule in India and made Delhi and Lahore his capital cities.
In 1206, a rebellion rose in Punjab so Ghori returned and crushed the rebels and on his way back to Ghazni he was assassinated by someone which is still arguable as some say it was a Hindu Ghakars while others say it was a Hindu Khokers — both different tribes.
Shahabuddin Ghori did not have any offspring who could inherit his empire. But he treated his Turkic slaves as his children, he provided them with education and trained both as soldiers as well as administrators. Many of his loyal slaves got positions in government as well as in army.
In India Qutb-ud-din Aibak became his successor and ruled over Delhi. Another slave, Nasir-ud-din Qabacha became the ruler of Sindh and Multan. In fact, Qutb-ud-din Aibak laid down the foundation of slave dynasty in India. Nasir-ud-din Qabacha was finally defeated by Shams-ud-din Iltutmish and Sindh and Multan became part of the Delhi kingdom.
Mahmud of Ghazni opened the gate for the Turkish conquests in India but the task of consolidation was done by Shahab-ud-din Ghori and his successors led to the establishment of Muslim settlements in the subcontinent for many hundred years.