First, we have to remove the notion that India was ruled by the Muslims for over a 1000 years. Most parts were not. The kind of resistance they faced is just glossed over.
This is the Umayyad caliphate a truly unstoppable force that got into Africa, West Asia and even into Europe. Look at the where the map stop at the right.
The green map stops at the banks of Indus due to a series of decisive victories that the Indian kings had against theThe one place that went in their control — Sindh — became Muslim and it was critical in swinging the partition of 1947.
Without that kind of resistance to the Umayyad caliphate, there would have been far bigger Islamisation of all of India.
Phase 1 won (apart from Sindh).
Phase 2 came 300 years later with the(the Afghans)— they were able to penetrate past the Indus and were able to take Punjab and Kashmir.
However, this empire was short lived and besides the raids on various Hindu cities, didn’t establish much control over north India.
Phase 3 came with 2 centuries later theand this incursion was far bigger than past. A lot of northern India came under their control. The Delhi Sultanates that got established even reach as far down south as Madurai — . However the control over the south was very short as the gave a strong resistance. They not only pushed back most of the sultanates, but also rebuilt a lot of the Hindu temples.
Many of the Khans were not as proselytising as the Arabs. Some like theeven tried Hinduism. While conversions and killing steadily happened, given that the sultanates were constantly fighting and constantly falling apart not many of the Hindus were converted.
Phase 4 came with the Mughals. By the time Babur came to India, the Delhi sultanate were reduced to just Punjab, Haryana and UP.
Babur took over the ailing Lodhi dynasty, but didn’t expand it much.
After that another round of resistance came — this time in the form ofwho took much of the territory off the Mughals, until a stray arrow hit him at the
This gave Akbar the victory. Unlike his predecessors, he took a more moderate line that helped him consolidate and avoid a lot of the resistance.
Then his great grandson Aurangzeb once again disturbed the applecart. This time theunder Shivaji rose as the head of the resistance and within decades of Aurangzeb’s death took over most of India.
(EDIT: One should also note the strong contributions made by the, Guru Gobind Singh and other great Sikhs who actively fought against the conversion of Hindus by the Muslims. This resistance is an importance piece for Hinduism’s survival in parts of India’s northwest).
From the period of Ghor’s first victory in 1200s to the time the Marathas took over there is only a 5 centuries gap. Even in the 5 centuries, a lot of India remained out of Islamic control. And the resistance kept coming that the rulers either were forced to take a more moderate subjects to bring more support or get disrupted.
In short, it is not like the Indians surrendered. There was always a strong resistance and that is why India didn’t end up like Persia or Egypt.
The religion that took the biggest hit with the invasions were the Sramanic ones — Buddhism and Jainism. Buddhism especially required a strong organisation (Sangha) and the support of the kings. It is quite centralised and thus was able to be cut.
Hinduism is highly decentralised and thus receded into the villages during the period of peak invasions and bid its time.
Over the past centuries Hinduism not only survived but kept expanding its reach. It reached into northeastern India [such as Manipur] and also started integrating a lot of village traditions into its fold — bringing both the masses and some of the black magic elements.
There is a reason why India is unique among the countries in retaining its bronze age religious traditions to this day and a reason why all these great empires below stop at the borders of India —
There are a badass group of people to the east of Indus who will fight back and are not going to give up.