What is the story of Lord Yama and devil Ravana's fighting.
After Lord Brahma granted boons to Ravana, Ravana began to harass humans and kings. Sage Narada suggested Ravana to invade Devas rather than human Kings to show his prowess and strength. Narada suggested to invade Yama Loka and fight with Lord Yama, God of death so that Ravana could be killed by Kala Danda.
Ravana went to abode of Lord Yama and huge battle ensued.
Agastya continued: “When Yama heard Ravana’s loud roaring, he concluded that the enemy was victorious and that his own army had been destoryed. Believing that his forces had been wiped out, his eyes became blood red and he hurriedly said to his charioteer: ‘Bring my chariot!’
“After bringing the huge chariot, the charioteer stood there and the glorious Yama climbed into the chariot. With a spear and mallet in his hands, the lord of death, who destroys all these three worlds, stood in front of the charioteer. Yama’s divine rod of chastisement stood at his side in a personified form blazing like fire. At his sides stood perfect nooses and a mallet in its personified form whose impact was like fire. Seeing the lord of death, who was a cause of fear for all people, enraged, the three worlds thereupon became disturbed and the residents of the heavenly planets began trembling.
“Then the charioteer urged on the lustrous horses, and the chariot proceeded forward making a frightful noise as it reached the place where the rakshasa was. In one moment those horses, being equal to those of Indra, brought Yama to the place where the battle was raging. When Ravana’s ministers saw that chariot, which was bearing the lord of death, and was therefore frightening to behold, they immediately fled. Because of their meager strength, they became overwhelmed with fear and lost consciousness. Unable to fight at that time, they fled in all directions. But when Ravana saw that chariot which was a cause of fear for the world, he did not feel disturbed or afraid. Yama then approached Ravana and hurled spears and javelins at him, piercing his vulnerable parts.
“Ravana, however, who was self-situated, released a shower of arrows on Yama’s chariot, as a cloud would pummel a mountain with rain. As hundreds of spears stuck against the rakshasa’s chest, he was unable to fight back because of the pain he felt from his wounds. In this way, as the battle raged on for seven nights, Yama, who employed many different kinds of weapons, rendered Ravana unconscious and averse to fighting.
“Then, O hero, a tumultuous duel ensued between Yama and Ravana, both desiring victory and neither retreating from combat. The the gods, accompanied by gandharvas, siddhas and great sages, gathered at that battlefield, placing Lord Brahma before them. While the chief of rakshasas and the lord of the dead were fighting, it seemed as if the world was about to end. Ravana stretched back his bow, which was as effulgent as Indra’s thunderbolt, and released arrows, seemingly filling all intervening space.
“Ravana struck the lord of death with four arrows and the charioteer with seven arrows. He quickly pierced Yama in his vital parts with one thousand arrows. Then out of Yama’s mouth came a fire of anger with a garland of flames along with breath and smoke. Witnessing that marvel in the presence of the gods and danavas, both Yama and death personified felt inspired to fight.
“Extremely angered, the personification of death said to Yama: ‘Leave me on the battlefield until I kill this sinful rakshasa! The rakshasa will not live past today, for this is a natural law. The glorious Hiranyakashipu, Namuci, Shambara, Nisandi, Dhumaketu, Bali, the son of Virocana, the daitya Shambhu, the great king Vritra, Vana, royal sages learned in the scriptures, gandharvas, mighty nagas, wise men, serpents, daityas, yakshas, hosts of celestial damsels, this earth with its oceans, mountains, rivers and trees were brought to an end by me at the end of the age. These and many other great and powerful persons who were difficult to approach were killed by me as soon as I saw them, what to speak of this night-stalker. Leave me completely alone until I have slain him. No one whom I see can survive, no matter how strong they are! O Yama, when I see this fellow, he will not survive for even a short while. This is not because of my strength, but is a natural thing.’
“After hearing death personified’s declaration, the glorious Yama said to him: ‘You stay here. I shall kill this fellow.’
“Thereafter Yama, his eyes bloodshot from anger, lifted in his hand his unfailing rod of chastisement. On its four sides were deadly nooses. Also the personified form of a mallet stood there shining like fire or a thunderbolt and could take away the life of living beings by its mere sight, what to speak of being touched or knocked down by it.
“When that great weapon with its circle of flames was touched by the mighty Yama, it shone as if it was going to incinerate the rakshasa. All the rakshasas fled from the battlefield in fear of Yama. All the gods also felt perturbed when they saw Yama with his rod of chastisement raised. As Yama was preparing to strike Ravana with his rod, Lord Brahma personally appeared there and said to him: ‘O strong-armed son of the sun-god, your prowess is immeasurable. Actually you cannot kill this night-stalker with your rod. In fact, I have given a boon to this rakshasa. Any boon or promise which I have given should not be invalidated. Anyone, whether a god or a man, who renders my word invalid will have reduced all the three worlds into liars. Of this there is no doubt. If you release this weapon in a fit of anger, it will destory all living entities, both those that are not dear to you and those that are.’
“‘Indeed, this rod of chastisement is unfailing in its effect on all living beings and its effulgence is immeasurable. It was previously created by me and is accompanied by death. As such, my dear one, you should not strike Ravana in the head with this weapon, for if it should fall, no one would survive for more than a moment. Whether this rakshasa dies from being struck by this weapon, or whether he survives, in any event my boons will have been rendered false. Therefore, withdraw this raised rod from Ravana and in that way uphold my veracity, if you care about the worlds.’
“When petitioned in this way, the righteous Yama replied: ‘Because you are my master, this rod is now withdrawn. If I am unable to kill him because of the boons you have given him, what can I do now by staying on the battlefield? I shall therefore vanish from the sight of this rakshasa.’ After saying this, he disappeared right there with his chariot and horses.
“After Ravana defeated Yama, he proclaimed his own name. Mounting the Pushpaka airship, he emerged from Yama’s abode. Yama and Narada Muni ascended to the heavenly planets with the gods headed by Lord Brahma.”