The third of the jyotirlingas is Mahakala.
The city of Avanti is on the banks of the river Kshipra (Shipra).
A brahmana named Vedapriya used to lived in the city of Avanti. He used to worship Shiva everyday and he had brought up his four sons to do the same. These sons were named Devapriya, Priyamedha, Suvrita and Suvrata.
Not very far away, on a hill named Ratnamala, there used to live an asura named Dushana. Dushana was evil, he could not stand the idea of the Vedas being read and the religion prescribed in them followed. He went about destroying this righteous religon wherever he could. Dushana got to know that in the city of Avanti there lived four brahmanas who followed the righteous religion and worshipped Shiva. These were Devapriya, Priyamedha, Suvrita and Suvrata. Their father Vedapriya had died by then.
Dushana and his cohorts came and attacked the city of Avanti. They threatened to kill the four brahmanas, but the brothers were not at all perturbed. They continued to pray to Shiva. They bowed in obeisance before the linga.
Suddenly a tremendous sound was heard and a pit appeared in the ground in front of the linga. Shiva himself appeared in this pit. Dushana was burnt into ashes from the force of Shiva's roar. And Shiva put all of Dushana's soldiers to flight.
The brahmanas prayed that Shiva might always be present at that place and Shiva agreed. This is the place that is known as Mahakala.<span> </span>is the place that is known as Mahakala.