About 3000 years ago, King Ashwasen was ruling over the Kingdom of Varanasi, which is also known as Banaras, situated on the bank of Holy River Ganga. They had a son named Parshva Kumar. Parshva Kumar later became the 23rd Tirthankara Parshvanath of present age (Avasarpini).
At that time there was a mendicant named Kamath. He had lost his parents in childhood and was raised as an orphan. Being disgusted of his miserable life, he had become a monk and was undergoing severe penance. He came to Varanasi to perform a Panchaagni (five fires) penance. Many people were impressed by his penance and therefore worshipped Kamath. When young prince Parshva kumar came to know this, he realized the violence of living beings involved in a fire. He came there and tried to dissuade Kamath from the sacrificial fire.
Kamath did not agree that life of any being was at stake because of his ritual. By his extra sensory perception, Parshva kumar could see that there was a snake in the wood that was put in the sacrificial fire. He asked his men to take out that wood and to shear it carefully. To the surprise of the onlookers, a half burnt snake came out of the burning piece of wood. The snake was burnt so badly that he died. Parsvha kumar recited the Navakar Mantra for the benefit of the dying snake, who was reborn as Dharanendra, the lord of Asurkumars. Kamath became very annoyed by this interference but was unable to do anything at that time. He started observing a more severe penance and at the end of his life, he was reborn as Meghmali, the lord of rain.
Observing the miseries that living beings had to experience, Parshvakumar developed a high degree of detachment. At the age of 30, he renounced all his possessions and family and became a monk. Later on, he was known as Parshvanath. He spent most of his time meditating in search of ultimate bliss for all.
Once, while he was in meditation, Meghmali saw him. He recalled how Parshvanath had interfered in his penance in an earlier life. He decided to take revenge. By his supernatural power, he brought forth all kinds of fierce and harmful animals like elephants, lions, leopards, snakes etc. As Lord Parshvanath stayed in meditation unperturbed, Meghmali brought forth heavy rains. The rainwater touched the feet of Parshvanath and started accumulating. It came up to his knees and then to his waist and in no time, it came up to his neck.
Dharanendra noticed that Parshvanath, his benefactor, was going to drown in rising flood water. He immediately came there and placed a quick growing lotus below the feet of the Lord so that he could stay above water. Then he spread his fangs all across the head and the sides of the Lord in order to protect him from pouring rain. Dharanendra then severely reproached Meghmali for his wretched act and asked him to stop the rain. All efforts of Meghmali to harass the Lord were thus in vain. He was disappointed and realized that he was unnecessarily creating trouble for the graceful, merciful Lord. He withdrew all his supernatural power and fell at the feet of the Lord with a sense of deep remorse. He sincerely begged the Lord to forgive him for his evil acts.