When JRR Tolkien went about writing Lord of The Rings, he just didn’t set out to write an engaging fiction, he set out to write a Mythology for Britain. He noticed that in myriad of great literature Britain had produced, it lacked a definitive cultural epic.
So in writing Lord of The Rings, he took to building a world so deep, it’ll become a standard in world building. But his stories were mostly setting driven. As far as characters were concerned, they mostly followed certain archetype rather than layered complexities.
It’s curious that while building his central hero in Aragorn, the character journey mirrored so much of the journey followed by central characters of 2 quintessential epics coming from India, Ramayana and Mahabharata. Both Shri Ramand Yudhishthir, princes born with claim to throne, both epitome of moral duty and bravery. Both having to spend significant time in exile away from royal luxuries, and having to prove their worth in great wars.
There are few more parallels found in interrace alliance against great evil. Maybe JRR Tolkien found his inspiration from those Epics. He was a well read scholar, and without a doubt aware of Hindu historia.
Regardless of if he took inspiration or not, the common theme of exiled Prince, epitome of morality triumphing in a great war, and establish a just rule is notable.