Ratnakar, the bandit, became the poet Valmiki. Once when he tried to rob a sage, of his meagre belongings, he was told that no one else but he would suffer the consequences of his misdeeds. Repentant and reformed, he asked the sage for the way out of sin. He was told to recite Mara, mar (reverse of Rama). The bandit sat in penance and recited the mantra and forgot the world. An anthill enveloped him. When he was dug out, he was a realised soul and called Valmiki (one who came out of Valmike - Sanskrit for anthill). The urge to write Ramayana was triggered by Valmiki's sensitive reaction to the wailing of a bird, whose mate was killed by a hunter. The ideal society portrayed so realistically in the Ramayana by Valmiki made Gandhiji name the Utopia he envisaged for India: Rama Rajya!
Valmiki