According to legend
There was a ruler of Ujjain called chandrasena.
Who was devotee of lord Shiva.
One day a farmer boy named shrikhar was walking by the side of the palace.He heard the king chanting the Lord’s Shiva name.He rushed and start praying with him.
However the guard remove him and sent him outskirts of the city.
The rival king Ripudamana and King singhaditya of the neighboring decided to attack the kingdom the news spread to a priest named Virdhi.
Hearing this shrikhar and virdhi started to pray lord Shiva at the river shipra.
With the help of powerful demon Dushan
Who was bless by lord Brahma
To be invisible.. He plundered the city and attack all the devotes of lord shiva.
Upon hearing the pleas of his devotes.
Lord Shiva appeared in his Mahakala form and destroyed the enemies of king chandrasena
Upon the request of his devotees lord Shiva agreed to resides in the city and become the Chief deity of the kingdom
Lord also declared that people who worshipped him in this form would be free from the fear of death and disease
They would be protected by the lord himself.
❇ Akal mirtyu vo mare Jo karm kare chandal ka
Kaal uska kya kare Jo bhakt ho Mahakal ka..❇
(at Ujjain Mahakalesvar mandir)





