Mahakaleshwar (jyotirlinga) temple, Ujjain

Mahakaleshwar Jyotirling Main Temple. Wikimapia

Mahakaleshwar Jyotirlinga in Ujjain,  a prominent Hindu temple dedicated to Lord Shiva is one among the twelve Jyotirlinga sthalas - abodes where Lord appeared as a pillar of Jyoti - fire to prove his supremacy over Lords Brahma and Vishnu and subdue their ego. The 12 Jyotirlinga temples are considered to be the holy abode of Lord Shiva.  It is located on one side of the Rudra sagar lake in the ancient city of Ujjain, Madhya Pradesh. The presiding deity, Lord Shiva in the  form of lingam and  is believed to be Swayambhu (self-manifested), that was consecrated with chanting of certain mantra as per temple Agama Sastras.

The temple of Mahakaleshwar of great antiquity with massive front part and imposing  tower  dominates the  skyline of Ujjain city. The sight is awe-inspiring  and is part  of the city life and its people Here  the lord reigns eternally guarding the city and its people . The temple has five levels, one being below the ground and is  surrounded by massive walls  with a wide open court yard. This historical temple is located on the banks of the river Kshipra. As part of the puja protocol, after  abiskekam, Chitabhasm (ash) is


Mahakaleshwar Jyotirling. Ujjain The Divine India

applied on the deity and  idol of Mahakaleshwar is in the grabagraha -sanctum also known as  Dakshinamurti (facing the south) with Nandi (bull) on the south side. The idol of Omkareshwar Mahadev is consecrated in the sanctum above the Mahakal shrine. Here Mahadev is  referred to as Swapaneshwar and  his consort Shakti is  called Swapaneshwari. Intense prayers at this temple right before the god and goddess will never go unnoticed and the devotees will never miss the blissful experience they get. The idols of Ganesh, Parvati and Kartikeya are around the  sanctum sanctorum. There is a separate shrine for Nagchandreshwar on the third story  and is open to public for  darshan only on the day of Nag Panchami.
Mahakaleshwar Jyotirling. Ujjain. Creative Darshan
That This temple is glorified in  the 7th century CE Tamil devotional work Tevaram (devotional hymns on Lord Shiva) in which saivaite saints Thru Gnana Sambandar, Sundarar and Thrunavukkarasar referred the Ujjaini Mahakal as
Tiru Oonjai Maakalam (oonjai means Ujjaini in Tamil) suggests that this temple is pretty old. The temple  normally is open from 4 am to 11 pm and Maha Shivaratri is a major festival celebrated on a grand scale here. A huge fair or mela is held on that day here. 
Mahakaleshwar Jyotirling. Ujjain. Amritsar Temples

Here at Ujjain lots of people visit this holy shrine to get his blessings  because Siva is Nishkam or lust-less and has no material desires. But he lavished wealth on his devotees if they have trust in him and do their duty with dedication, without falling prey to wicked ways to get material happiness. 

The shrine here is considered as one of the 18 Sakthi peethas that are endowed with sakthi (mystic power)  as a part of  Sati Devi fell on these places when Lord Shiva was carrying the corpse of Sati Devi. The upper lip of Sati Devi is believed to have fallen here and the sakthi called Mahakali.

Mahakaleshwar Jyothirlinga Temple, Ujjain.en.wikipedia. org
Shiva carrying the corpse of Sati Devi, en.wikipedia.org
Located on the banks of the river Kshipra, the city of Ujjain  also known as Indrapuri Amaravati, and Avantika. This town is
“Swarna Sringa.” because several temples have  gold-plated  towers.

According to Sthala purana (legend)of Ujjain in Avantika there lived a Brahman with four sons, who were ardent devotees of Lord Shiva.  who were all devotees of Siva. An obnoxious, wicked demon king  by the name of Dushan, who after getting boon from Brahma, tortured and terrorized the people living there. The scholarly Brahmins  stoically underwent untold miseries  and pain , but never had they failed to worship Shiva and the nithya pujas conducted despite impediments. Their bhakthi / devotion was more intense than ever before. The demon ruler and his henchmen saw to it that there were no Vedic and Dharmic activities taking place in that area. The Brahmins never stopped their prayer to Lord Shiva. Enraged Dushan, now physically attacked the Brahmins and prevented them to conduct prayers and Pujas. As his acts of violence and nefarious activities transgressed the limits of endurance, the Brahmins prayed to Lord Shiva. 

When the demon and his associates were on a rampage, the earth split open
near the Parthiv Murty with a thunderous noise and a crater was formed. Out came through the crater a gigantic  form of Mahakal in all his glory. No sooner had Shiva assumed the form of a Mahakala - mammoth size than he reduced the demon and his associates into ashes in a jiff.

Since then, the very name Ujjain has become embodiment of Mahakala and in those days Ujjain was the seat of Mahakal and the rulers were fervent Shiva devotees. 


According to another legend the ruler of of Ujjain Chandrasen  a staunch devotee of Lord Siva. had a beautiful precious stone called Sundara Chintamani which he wore on his necklace. It was given to him as a gift by  his friend Manibahdra a follower of Maheswari. It was so irresistible and engaging, some kings wanted Chandrasena to give the  gemstone  to them. Upon his refusal, his rivals king Ripudamana and king Singhaditya of the neighboring kingdoms  turned against him  and attacked the kingdom. His intense prayer to the lord never failed and the  lord destroyed the enemies, by assuming the form of Mahakala.

Once a Brahman widow with a son was wandering near  Mahakal. the king Chandrasena,  on the advice of Lord Shiva,  was performing Puja to the stone installed in his empty house. He imagined it to be an incarnation of Shiva and started worshiping it. The boy, for un-known reason, attracted by the beauty of the stone assumed it to be a form of Shiva  and began to meditate. One day his mother threw away the Shiva linga as the boy had spent most of his time with it chanting all the time, forgetting house-hold chores, sleep, food, etc. The boy was grief-stricken.  He started to pray to Shiva with intense concentration. This stone Sivalinga which the boy had been worshiping,  became a precious stone and ultimately turned into a Jyotirlinga. Not only  was the boy  surprised to see a resplendent Jyotirlinga, but also a big beautiful palace. Thus, with God's grace  the boy became rich and led a very happy life.

The above legends tell us how the God rescued his devotees when they were in serious trouble and how he was compassionate to those who had trust in him.
 
Ref:
http://shaivam.org/siddhanta/sp/spjyoti_mahakal.html

https://en.wikipedia.org/wiki/Mahakaleshwar_Jyotirlinga