Foundation of Islamic Rule in India was done by the Turks but not by the Arabs. Although the Arabs were the first Muslim invaders on India, they became insignificant after their initial success and their invasion became a passing episode in the political history of India.
The work started by them, however, was carried to completion by the Turks.
The Turks by then had embraced Islam and had gained control over the Khalifa of Baghdad. They were more aggressive and ambitious than the Arabs.
They were brave, bold and determined and were thoroughly materialistic in outlook. In patriotism and fanaticism, they even excelled the Arabs. In fact, they were fit to establish and rule over a vast empire. Disintegrated India became a victim to their ambition.
The first Turkish invader on India was Sultan Mahmud of Ghazni who was honored by the Khalifa with the titles of Yamin-ud-Doulah (the right-hand of the empire) and Amin-ul-Milat (Custodian of Faith). It is said that at the time when Mahmud was honored by the Khalifa, he took vow to lead every year an expedition against India, the land of the infidels. He tried to fulfill it. In between A.D. 1000 and A.D. 1027, Mahmud had led almost seventeen expeditions to India. Although these expeditions of Mahmud were for the propagation of Islam and destruction of the infidels, his materialistic attitude for this could not be undermined.
He invaded Indian kingdoms frequently and plundered Indian cities and temples. He took away huge quantity of wealth from India and killed her people in thousands. He made the Shahi kingdom out of existence which had been guarding the north frontiers against foreign invaders. Mahmud also made Punjab and Afghanistan a part of the Ghazni kingdom. But he did not establish an Islamic rule in India.
The credit of founding a Muslim empire in India does not go either to Muhammad-bin-Qasim or to Mahmud of Ghazni but to Muhammad Ghori, the ruler of Ghur, who succeeded in establishing a Muslim empire in India on a secured footing. Muhammad Ghori was the third Muslim invader of India. He made repeated invasions to India and conquered Punjab, Sind and Multan in some of his initial invasions.
After this his eyes fell on the powerful Rajput kingdom of Delhi and Ajmer which was then ruled by a young, energetic and dynamic king Prithviraja Chauhan. Muhammad Ghori who was bent upon conquering the whole of Hindustan, met Prithviraja in the first battle of Tarain in 1191 A.D. Muhammad was defeated and wounded in this encounter and had fled away with life.
In spite of the defeat, Ghori did not give up his Indian ambitions. In the very next year in 1192 A.D he met Prithviraj Chauhan in the battle field of Tarain and fought desperately with tricks and technique. He won the war this time and this was a great victory against a great king of India. Prithviraj was captured and taken as a prisoner.
The second battle of Tarain is a landmark in the history of India and it heralded Muslim rule in India. After conquering Delhi, Ajmer and Kanauj subsequently, Muhammad Ghori laid the foundation of the Muslim rule in India. But he left the work of its consolidation to Qutub-ud-din Aibak who was his most trusted lieutenant.