Jadunath Sarkar's Shivaji and His Times (1919) provides some background to caste enmity through the historical figure of Shivaji. Although we do not know for certain that Dr. Ambedkar read Sarkar's book, the work elicited such popular and scholarly interest and controversy that by 1928 it had already run into its third edition; it is therefore likely that Dr. Ambedkar came across it at some point.
In the following passage, Jadunath Sarkar desribes the deep-seeded resentment between the Kayasthas and Brahmins during Shivaji's reign. He writes that well after Shivaji's death, the Marathas of the eighteenth century, newly independent from the Mughal empire, found that "social grades turned against each other. The Brahmans living east of the Sahyadri despised those living west, the men of the hills despised their brethren of the plains, because they could now do so with impunity. The head of the State, though a Brahman, was despised by his other Brahman servants,—because the first Peshwa's great-grand-father's great-grand-father had once been lower in society that the Puna Brahmans' great-grand-fathers' great-grand-fathers! While Chitpavan Brahmans were waging social war with the Deshastha Brahmans, a bitter jealousy raged between the Brahman ministers and governors and the Kayastha secretaries. We have unmistakable traces of it as early as the reign of Shivaji. 'Caste grows by fusion.' It is antagonistic to national union. In proportion as Shivaji's ideal of a Hindu swaraj was based on orthodoxy, it contained within itself the seed of its own death. As Rabindranath Tagore remarks:
'A temporary enthusiasm sweeps over the country and we imagine that it has been united; but the rent and holes in our body social do their work secretly; we cannot retain any noble idea long.
'Shivaji aimed at preserving the rents; he wished to save from Mughal attack a Hindu society of which ceremonial distinctions and isolation of castes are the very breath of life. He wanted to make this heterogeneous society triumphant over all India! He wove ropes of sand, he attempted the impossible. It is beyond the power of any man, it is opposed to the divine law of the universe, to establish the swaraj of such a caste-ridden, isolated, internally-torn sect over a vast continent like India.'
Shivaji and his father-in-law Gaikwar were Marathas, i.e., members of a despised caste. Before the rise of the national movement in Deccan in the closing years of the 19th century, a Brahman of Maharashtra used to feel insulted if he was called a Maratha. 'No,' he would reply with warmth, 'I am a Dakshini Brahman.' Shivaji keenly felt his humiliation at the hands of the Brahmans to whose defence and prosperity he had devoted his life. Their insistence on treating him as Shudra drove him into the arms of Balaji Avjji, the leader of the Kayasthas and another victim of Brahmanic pride. The Brahmans felt a professional jealousy for the intelligence and literary powers of the Kayasthas, who were their only rivals in education and Government service, and consoled themselves by declaring the Kayasthas a low caste not entitled to the Vedic rites and by proclaiming a social boycott of Balaji Avaji who had ventured to invest his son with the sacred thread. Balaji naturally sympathized with his master and tried to raise him in social estimation by engaging Ganga Bhatta who 'made Shivaji a pure Kshatriya.' The high-priest showed his gratitude to Balaji for his heavy retainer by writing a tract (or rather two) in which the Kayastha caste was glorified but without convincing his contemporary Brahmans."
Sarkar, Jadunath. Shivaji and His Times. Calcutta: MC Sarkar & Sons, 1919, 482-85
Annotation by: Koirala/Pritchett