Short answer
Islam reached India in three main ways: Arab traders on the Malabar coast in the first Islamic centuries, the conquest of Sindh by Muhammad ibn al-Qasim in 92 to 93 AH (711 to 712 CE), and later the Turkic sultanates of north India together with the Sufi teachers who drew many people to Islam.
The accepted historical account is that Islam came to the subcontinent through trade, the Umayyad campaign in Sindh, the later Ghaznavid, Ghurid and Delhi sultanates, and above all the preaching and example of scholars and Sufis. The Hanafi school became the main school of the region.
The four schools agree on this.
Explanation
Arab sailors traded with the west coast of India long before Islam. After Islam, Muslim merchants settled in Kerala, Gujarat and other ports, and small Muslim communities grew there peacefully. Kerala tradition ties some of its oldest mosques to this early period, though the exact dates are debated.
In 92 to 93 AH (711 to 712 CE), in the time of the Umayyad caliph al-Walid, the young general Muhammad ibn al-Qasim took Sindh in present-day Pakistan. Historians record that he made agreements leaving temples and local religion in place, treating Hindus and Buddhists much like People of the Book for jizya.
From the eleventh century, Turkic rulers from Ghazna and Ghur pushed into north India, and in 602 AH (1206 CE) the Delhi Sultanate was founded. The Mughals followed from 932 AH (1526 CE). Yet the spread of Islam among ordinary people owed most to Sufi teachers. Khwaja Mu'in al-Din Chishti settled in Ajmer and died there in 633 AH (1236 CE), and the Chishti, Suhrawardi and Naqshbandi orders drew many by their character and care for the poor. Historians note that the largest Muslim populations grew in Bengal and Punjab, on the eastern and western edges of the sultanates.
The subcontinent later produced great Hanafi scholars, from Shaykh Ahmad Sirhindi and Shah Wali Allah to the founders of Darul Uloom Deoband. See Was Islam spread by the sword? and How did Islam spread in Indonesia?
The evidence
Quran, Surah Saba 34:28
وَمَآ أَرْسَلْنَٰكَ إِلَّا كَآفَّةًۭ لِّلنَّاسِ بَشِيرًۭا وَنَذِيرًۭا وَلَٰكِنَّ أَكْثَرَ ٱلنَّاسِ لَا يَعْلَمُونَ ﴿٢٨﴾
And We have not sent you except comprehensively to mankind as a bringer of good tidings and a warner. But most of the people do not know.
The message was for all peoples.
Where the ruling is recorded
- Futuh al-Buldan (al-Baladhuri), Chapter on the conquest of Sindh. The early account of Muhammad ibn al-Qasim's campaign and treaties.
- al-Bidaya wa al-Nihaya (Ibn Kathir), Events of the years 92 to 95 AH, the conquest of Sindh. Ibn Kathir's record of the campaign.
- Nuzhat al-Khawatir (Abd al-Hayy al-Hasani), Entries on the scholars and Sufis of India. Biographies of the scholars and saints of the subcontinent.
This answer is pending review by the scholars on our team. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.