In the Ramayana, Sugriva is fortunate to associate himself with Rama and this friendship became beneficial to both of them. When Sita was lost and Rama and Lakshmana were in search of her near the Pampa lake, circumstances favoured the flowering of friendship between Rama and Sugriva.
At that time Sugriva was living in hiding from Vali in Rishyamuka hill. Seeing Rama and Lakshmana from a distance, he sends Hanuman to find out their identity. Hanuman assumes a human form as an ascetic and enquires about their whereabouts. In a lecture, Sri M. V. Anantapadmanabhachariar pointed out that Rama was openly impressed by the erudition, propriety, polished rendering and humility of Hanuman's interaction with them.
Hanuman's enquiry of them, based on his observations, is thorough. He is able to assess their situation and frankly puts forth his questions to them. The brothers seem to be of royal lineage but are clad as hermits. Are they celestials in human form? What was the reason for them to be in the forest area? They deserve to be decorated with ornaments worthy of princes, yet they do not wear any. The bow they carry is their singular adornment. They evince effulgence and courage. Yet they look distressed and he would like to know the cause for their sorrow.
When even such a lengthy address didn't evoke any response from them, Hanuman paused and decided to introduce himself instead. He admits that he is a monkey who had assumed this form at the behest of his master Sugriva whom he serves as a minister, and who wishes to seek to befriend Rama. Rama tells Lakshmana to reply suitably to Hanuman's address which He appreciates immensely.
Hanuman's role in this situation is valuable. He leads them to Sugriva's presence and they pledge to remain as friends at all times in the presence of fire. Rama assures Sugriva that he will eliminate Vali.
Mutual love and trust between two people blend to form lasting friendships. It is a precious relationship that brings out the noble traits in the individuals who act selflessly for each other's welfare.