History is a tricky subject in India. History is somewhat politicized, in my opinion - which is sad, because history with an agenda goes against the tradition of holding 'Truth' to be paramount. It is better to be unsure and exploring than to be 'sure' and wrong.
I came across this interesting article by one Dr. Santosh Helekar, who seems to conclude that the Aryan invasion theory may be valid, after all! More importantly, there is the implication that the casteist tendencies might have had a racist origin - more specifically, Indo-European.
This kind of makes sense to me. While tribal feelings are predominant worldwide, they are not as institutionalized as in the European 'tribes' - that have become the European 'nations' today. It also appears that the caste hierarchy was either non-existent or not as predominant among the early Dravidian population. If one looks at the ancient Tamil literary works, while one could come across a wide variety of themes dealing with social customs, romance, valour, filial duties, friendship, betrayal, adultery, etc., there is hardly any mention of caste or any such division based on birth. Thiruvalluvar, who had seen it necessary to talk about a whole variety of subjects in his 133 topics made of 10 couplets each to make Thirukural made of 1330 couplets, has said nothing on caste or any such discriminatory practice. That is odd, considering that he took great pains to warn about other 'vices' such as laziness, greed, etc.
No one can prove where caste system originated. We certainly cannot expect any objective analysis on this subject from most Indian experts. But, it's an interesting question, after all! I wonder how many Indians would have the courage to completely discard all feelings of caste-based identity from deep down in their heart...