India has in recent weeks seen some of its most concerted protests because of caste. At least 18 people were killed and hundreds injured in violent protests by members of the Jat community who are unhappy about the caste quota system, as they say it puts them at a disadvantage in government jobs and at state-run educational institutes. The BBC explains the complexities of India's caste system.
India's caste system is among the world's oldest forms of surviving social stratification.
The system which divides Hindus into rigid hierarchical groups based on their karma (work) and dharma (the Hindi word for religion, but here it means duty) is generally accepted to be more than 3,000 years old.
How did caste come about?
Manusmriti, widely regarded to be the most important and authoritative book on Hindu law and dating back to at least 1,000 years before Christ was born, "acknowledges and justifies the caste system as the basis of order and regularity of society".
The caste system divides Hindus into four main categories - Brahmins, Kshatriyas, Vaishyas and the Shudras. Many believe that the groups originated from Brahma, the Hindu God of creation.
At the top of the hierarchy were the Brahmins who were mainly teachers and intellectuals and are believed to have come from Brahma's head. Then came the Kshatriyas, or the warriors and rulers, supposedly from his arms. The third slot went to the Vaishyas, or the traders, who were created from his thighs. At the bottom of the heap were the Shudras, who came from Brahma's feet and did all the menial jobs.
The main castes were further divided into about 3,000 castes and 25,000 sub-castes, each based on their specific occupation.
Outside of this Hindu caste system were the achhoots - the Dalits or the untouchables.
How does caste work?
For centuries, caste dictated almost every aspect of Hindu religious and social life, with each group occupying a specific place in this complex hierarchy.
Rural communities were long arranged on the basis of castes - the upper and lower castes almost always lived in segregated colonies, the water wells were not shared, Brahmins would not accept food or drink from the Shudras, and one could marry only within one's caste.
Traditionally, the system bestowed many privileges on the upper castes while sanctioning repression of the lower castes by privileged groups.
Often criticised for being unjust and regressive, it remained virtually unchanged for centuries, trapping people into fixed social orders from which it was impossible to escape. Despite the obstacles, however, some Dalits and other low-caste Indians, such as BR Ambedkar who authored the Indian constitution, and KR Narayanan who became the nation's president, have risen to hold prestigious positions in the country.
Is the system legal?
Independent India's constitution banned discrimination on the basis of caste, and, in an attempt to correct historical injustices and provide a level playing field to the traditionally disadvantaged, the authorities announced quotas in government jobs and educational institutions for scheduled castes and tribes, the lowest in the caste hierarchy, in 1950.
In 1989, quotas were extended to include a grouping called the OBCs (Other Backward Classes) which fall between the traditional upper castes and the lowest.
In recent decades, with the spread of secular education and growing urbanisation, the influence of caste has somewhat declined, especially in cities where different castes live side-by-side and inter-caste marriages are becoming more common.
In certain southern states and in the northern state of Bihar, many people began using just one name after social reform movements. Despite the changes though, caste identities remain strong, and last names are almost always indications of what caste a person belongs to.
What about job quotas?
In recent years, there have been demands from several communities to be recognised as OBCs - over the past few days, at least 18 people have been killed in violent protests by the Jat community in Haryana and last year, the Patel community led huge protests in Gujarat demanding access to caste quotas.
Both are prosperous and politically dominant communities, but they support their demand for caste quotas by saying large numbers in their communities are poor and suffering.
Some say the caste system would have disappeared by now if the fires were not regularly fanned by politicians.
At elections, many caste groups still vote as a block and are wooed by politicians looking for electoral gains.
As a result, what was originally meant to be a temporary affirmative action plan to improve the lot of the unprivileged groups has now become a vote-grabbing exercise for many politicians.