It is claimed with some degree of certainty that the division of Hindu society, starting from the Vedic and Epic periods, into four castes (varna) with their subsequent, innumerable, more practical divisions according to profession (jati), gave stability to Indian society. Muslim writers, who frequented India within hundred years after the birth of Islam, give us a window into the Indian world in existence in the 8th century. Sindh fell to Muslim occupation in the year 712 C.E. to Muhammad bin Qasim, a cousin of Caliph of Baghdad. Chach-nama and writings of al-Biruni, though written in the 13th and 11th centuries, claim their sources from other contemporary writings. It appears as though the systematic classification was not rigid in the 8th century after all. Shudra as well as Brahmin kings were ruling and not all royalty belonged to the Kshatriya class.
Moreover, caste system was not prohibitive or repressive. It only conferred important rights of participation in the economic and political process while providing certain social obligations. Rural as well as urban assemblies like caste and guild councils gave endorsements of a particular leadership. Caste was not the basis for any exclusion of participation in the political process. The society became admirably stable, even if excessively stratified; this was not detrimental to progress but rather helped enhance it by systemizing it. Society was vibrant and life harmonious. Kingdoms were generally prosperous and the subjects contented with little discrimination or discord. Muslim writers did not fail to see the prosperity of trade and safety of travel in the highways, law and order in the society, despite the stratification into caste system. However they had trouble correctly identifying the various castes and many jatis, suggesting that the system appeared nebulous to an outsider and definitely not rigid at that time.
The passivity and rigidity of the caste system became pronounced only after the Muslims made their appearance on the shores of India, when religious discrimination and oppressive taxation (Jizya - a taxation on non-Muslims imposed by Muslim rulers), conspired to remove certain segments of the population from the political system and economic advancement. The Muslim rulers became quite adroit at exploiting it. Some Brahmins and Buddhist monks were exempt from the taxation. Caste system then became static, lost its influence in the process and came to be known as a distinguishing characteristic of orthodox Hinduism.
It was then that the notion of karma became the mainstream thinking of Hinduism, mostly to the disadvantaged. The caste system that had developed over thousands of years before now resulted in producing privileged classes and the oppressed, less fortunate ones. The theory of karma - whereby one's status was predetermined by one's conduct in the past life and could improve in subsequent lives by one's conduct in the current life - became a rational explanation for the caste system and provided much needed solace for those who were disadvantaged by it. The exercise of caste rights became obligatory but only ephemeral, in this present life, with better prospects in the life hereafter, if these obligations are met without complaints. Spirituality and faith helped in softening the effects of a harsh life. The fundamental beliefs of Hinduism and Buddhism of karma, samsara and punarjanma rescued the population from a wretched existence by offering them a beacon of hope for a better next life. Even in the face of adversity and hopelessness, desperate measures were not called for, as these were only occurrences in this temporary life.
The Hindu religion itself became more orthodox as a direct result of the external threat of a foreign religion with little tolerance to the 'infidels'. Al-Biruni writes about a much admired Brahmin king of Sindh in the 8th century called Chach (hence the historical journal: Chach-nama), who ruled admirably but went 'straight to Hell, when he died, as he is an infidel'. Much of the freedom enjoyed by the citizens had to be curtailed out of necessity and Islam had a profound negative effect on the progress of the more liberal Hinduism. The rigid Islam was only marginally influenced by Hindu religion as seen in Sufism, the segment of Islam that incorporated Vedanta of the Upanishads in their belief.
There were some Muslims, throughout history, that had tried to assimilate Hinduism into their own religion, but these were few and far in between. The ones who did try were ostracized by the rigid body of ulema, the Muslim scholars whose business it was to interpret the law in accordance to the Koran and Hadith. Akbar was somewhat successful but when the most tolerant Mughal, Dara Shikoh, son of Shah Jahan translated the Upanishads to Persian language, it was considered as blasphemy by theulema! Aurangzeb used it as ruse to attack Delhi and kill his brother, in order to 'save' his father, the Emperor Shah Jahan, from the 'demonic influences' of Dara Shikoh.
Today the fundamentalism of Islam has overshadowed every attempt at moderation and Sufism is a distant memory. Even the more moderate sect of Aga Khanis (Nizari Ismailis) have capitulated and are forced to follow the sharia laws, with the threat of being ex-communication looming over their heads.
It is little wonder that the Hindu community has become more fundamentalist in an attempt to confront the intolerant Islam. First the peaceful religion of Sikhism became militant (Mughals were responsible for this - three of their ten gurus were killed by the Mughals) and now Hinduism is leaning towards militancy and fundamentalism.