"In the subsequent Smriti period... Some historians speculate that this was the period when foreign kings became established in certain parts of India, and as a result of this, or as a reaction to it, there emerged a practice to fix legal rights based on varnas. it could be that brahmins came up with such laws in order to limit the rights of the foreign kshatriya kings at the time."
January 1, 1970
https://en.wikiquote.org/wiki/Caste_system_in_India