This extraordinary story traces the twists and turns in the life of Ratnakara, a ruthless highway robber, who used to burglarise people after killing them. Once, the robber tried to rob the divine sage Narada for the benefit of his family.
Narada asked him if his family would share the sin he was incurring due to the robbery. The robber replied positively, but Narada told him to confirm this with his family. The robber asked his family, but none agreed to bear the burden of sin. Dejected, the robber finally understood the truth of life and asked for Narada's forgiveness.
Narada taught the robber the mantra for salvation. However, the mantra in question, the name of Lord Rama, was not to be given to murderers and the like. Narada thus told Valmiki to chant 'Mara' the phonetic anagram of 'Rama' instead to circumvent this restriction. The robber meditated for many years, so much so that ant-hills grew around his body. Finally, a divine voice declared his penance successful, bestowing him with the name 'Valmiki': 'one born out of ant-hills' (Valmikam in Sanskrit means Ant-hill).