The four-tiered caste system gives Hindu society a strict hierarchical structure, with teachers and religious leaders at the top, and the fifth "undesirable" category performing "unclean" work. Where did it come from? Was it a colonial invention? Or are its roots embedded in ancient Indian culture?
Yes, British colonial powers invented the Indian caste system
Pre-colonial documents make almost no reference to the caste system. It was a British invention as a method of classifying and controlling the vast Indian population.
Colonial bureaucracy created the caste system
Colonial bureaucratic processes divided the population into castes. These bureaucratic divisions grew into social divisions.
The Portuguese, not the British or the Indians, invent the Indian caste system.
The caste system derives from a Portuguese labeling system.
There was a history of religious conflict in Portugal that led to the development of a kind of classification system. When Portuguese colonists came to India, they applied similar practices to the native people.