Lord Hanuman

Historical development
The earliest mention of a divine monkey, interpreted by some scholars as the proto-Hanuman, is in hymn 10.86 of the Rigveda, dated to between 1500 and 1200 BCE. The twenty-three verses of the hymn are a metaphorical and riddle-filled legend. It is presented as a dialogue between multiple characters: the god Indra, his wife Indrani and an energetic monkey it refers to as Vrisakapi and his wife Kapi.[23][24][25] The hymn opens with Indrani complaining to Indra that some of the soma offerings for Indra have been allocated to the energetic and strong monkey, and the people are forgetting Indra. The king of the gods, Indra, responds by telling his wife that the living being (monkey) that bothers her is to be seen as a friend, and that they should make an effort to coexist peacefully. The hymn closes with all agreeing that they should come together in Indra’s house and share the wealth of the offerings.
The orientalist F. E. Pargiter (1852–1927) theorized that Hanuman was a proto-Dravidian deity.[26] According to this theory, the name “Hanuman” derives from Tamil word for male monkey (ana-mandi), first transformed to “Anumant” – a name which remains in use. “Anumant”, according to this hypothesis, was later Sanskritized to “Hanuman” because the ancient Aryans confronted with a popular monkey deity of ancient Dravidians coopted the concept and then Sanskritized it.[25][27] According to Murray Emeneau, known for his Tamil linguistic studies, this theory does not make sense because the Old Tamil word mandi in Sangam literature can only mean “female monkey”, and Hanuman is male. Further, adds Emeneau, the compound ana-mandi makes no semantic sense in Tamil, which has well developed and sophisticated grammar and semantic rules. The “prominent jaw” etymology, according to Emeneau, is therefore plausible.[25]
Proto Dravidian roots
Epics and Puranas
Hanuman is mentioned in both the Hindu epics, Ramayana and Mahabharata.[29]
Hanuman is mentioned in the Puranas.[30][31] The Shiva Purana mentions Hanuman as an avatar of Shiva; all other Puranas and scriptures clearly mention him as the spiritual son of Vayu or incarnation of Vayu or sometimes avatar of Rudra (which is also another name of Vayu).[31][32] Author Devdutt Patnaik says, “In Vaishnava traditions, Hanuman is not related to Shiva. In Shaiva traditions, Hanuman is either Shiva’s avatar or son”.[33] Indologist Philip Lutgendorf writes, “The later identification of Hanuman as one of the eleven rudras may reflect a Shaiva sectarian claim on an increasing popular god, it also suggests his kinship with, and hence potential control over, a class of awesome and ambivalent deities”. Lutgendorf also writes, “Other skills in Hanuman’s resume also seem to derive in part from his windy patrimony, reflecting Vayu‘s role in both body and cosmos”.[10]

Other mythologies, such as those found in South India, present Hanuman as a being who is the union of Shiva and Vishnu, or associated with the origin of Ayyappa.[2] The 17th century Odia work Rasavinoda by Dinakrishnadasa goes on to mention that the three gods – Brahma, Vishnu and Shiva – combined to take to the form of Hanuman.[34] When Rama’s time of death was at hand, Hanuman barred Yama (the god of death) from claiming him.
There is a story in Padma Puranam which describe this event.
Yamraj tried many times but was not able to reach Ram and take away his life because Hanuman guarded Ram’s life. Ram understood the problem Yamraj was facing and decided to trick Hanuman.
Lord Ram dropped his ring. The ring fell into a crack in the floor. Ram then asked Hanuman to go and fetch the ring. Hanuman could change his large body into as small as a fly. So he jumped into crack. He followed the crack until he reached patal-loka. When he reached patal-loka he was greeted by king of snakes. The king of snakes knew the secret of life and death.
He asked Hanuman what was he looking for?
Hanuman replied, I am hanuman and I am looking for Ram’s ring.
He said, come with me I will give you ring. He took Hanuman to a room full of Ram’s rings. And asked him to take anyone.
Hanuman was surprised and asked him how can there be so many rings?
He replied each ring represent one kal chakra. In every chakra, there is a treta-yuga in which there is a Ram and a Hanuman. Every time Ram will drop his ring and a monkey will come to patal loka searching for his ring. By the time monkey returns back to earth Ram is gone.
Hanuman then understands the kal-chakra and he let go his dear God.
Jai shree Ram