The caste system in India is the paradigmatic ethnographic instance of social classification based on castes. It has its origins in ancient India, and was transformed by various ruling elites in medieval, early-modern, and modern India, especially in the aftermath of the collapse of the Mughal Empire and the establishment of the British Raj. From Wikipedia