In the first Yuga – the Satya Yuga, there lived a great king by name Muchukunda. He was brave and brilliant war strategist. Indra, the Lord of the Devas frequently asked him to help against the fight with the asuras.
However one particular battle between the Devas and the Asuras stretched on and on for many years. Muchukunda was so caught up in the battle that he forgot everything else. Every day was just a bloody battle between the Devas and the Asuras and nothing more. King Muchukunda carried on the battle on his shoulders....It went on and on and on.....
Lord Indra came and spoke to him after the end of the battle. 'Great King! You are the most brilliant strategist that I have seen. There has not been yet anyone like. Now that you have put the Asuras is the back foot, we will take it from here. I am sure you would want to lead a life without the stress of the battle and blood...'
King Muchukunda tiredly nodded his head, 'Yes my Lord! I myself was thinking the same thing....I was wondering how to tell you the same thing....I did not think it was right to live you in the middle of....' King Muchukunda gestured around him.
Lord Indra smiled, 'Now we have Lord Kartikeyan [Lord Shiva and Goddess Parvati's son] to lead us. He is our commander. So don't worry about us...'
Muchukunda happily nodded his head. Faintly, he recollected his wife, his children and his family. He shook his head tired...He really was very tired...He could not even remember the faces of his loved ones....'Devendra! Now that you do not need my services, I think I should get back to my family.... my kingdom.....'
Lord Indra unhappily nodded his head, 'Ah! That is where you have a problem....You see, the time of the Devaloka is different from the time on earth. A few years that you have spent here....eons and eons have passed on earth. The family you knew, the kingdom you had.....all of them have gone....Nothing of them remains....' King Muchukunda looked blankly at Indra. Indra gently told Muchukunda, 'You are a great hero my friend! What you have done for us, is unmatched...and you are a good man.....Ask me for any boon and I will give it you my friend....'
King Muchukunda was however too enlightened a soul to be bothered about the news of his family and kingdom...He nodded his head. He realized that there was nothing in earth which would bind him and pull him back.....He took a deep breath and also realized that he had seen enough battles, war and blood to last many lifetimes....
He tiredly looked at Indra and spoke, 'Indra! I am tired.....very tired and I have enough blood shed to last many life times...I want to forget all about it...I want to sleep...I want to keep sleeping so that I forget all about the violent life I have led....So that is the boon I seek, I want to sleep, nothing more...'
Indra nodded his head when King Muchukunda spoke again, '...and if anybody should disturb my sleep, they should be burnt to ashes....'
Indra nodded his head and granted King Muchukunda the boon he wanted. King Muchukunda entered a cave and slept....he slept, through the second and the third yuga...The third yuga was almost at an end.....
In the meantime, Lord Krishna, the Dark Lord had defeated Kamsa, the king of Mathura who was also his maternal uncle. Krishna crowned Ugrasena, his grandfather as the King of Mathura.
Krishna and Balarama realized that the situation was now tense.
Krishna spoke to Balarama, 'Rama! Kamsa may have been evil, but he has many powerful friends....We have to be very careful!'
Balarama nodded his head, 'Yes! We have to fight with the allies of Kamsa! There are quiet a lot of them!'
Krishna nodded, 'Actually it is not about us, that I am worried!'
Balarama nodded his head, 'Our people would not be safe in Mathura! We have to make sure, they are in a safer place....'
Krishna spoke with a twinkle in his eyes, 'I think it is time I used the help of Vishwakarma!'
Balarama grinned as he nodded his head.
Vishwakarma was the architect of the Devas. His constructions were brilliant and all of them were masterpieces.
Krishna met Vishwakarma, 'My Lord! I am in need of your services!'
Vishwakarma's heart swelled in joy...To be of help to the Dark Lord was the greatest honour...He bowed to Krishna, 'For you, my Lord, I will do anything!'
Krishna smiled, 'I want you to built a city for me, my Lord! A city which would be remembered for all time...'
Vishwakarma nodded his head. He got down to business, 'How do you want the city to look like...Any particular characteristics for the city?'
Krishna smiled and nodded his head, 'Spare no costs! Make the city as lavish as possible! It must be protected on all sides...so that even if I am not with my people, they should not be vulnerable to any attack....'
Vishwakarma caught the drift of Krishna's reasoning, 'I am guessing you want the people from Mathura to be able to go there immediately in case of any....any problems....'
Krishna smiled and nodded his head.
So Vishwakarma set about designing the city of Dwaraka, The land for building Dwaraka was reclaimed from the sea. It has residential and commercial areas, wide roads and plenty of palaces. They also had a hall to hold public meetings. The city had close to 7,00,000 palaces made of gold and precious stones! Each of Lord Krishna wives had her own palace. The city had beautiful gardens and the prettiest lakes. The city was protected by the sea on all sides....
Krishna was thrilled with the construction and thanked Vishwakarma. The Devas also lavished their gifts on Dwaraka....
However the time for using the city came too soon....
Kamsa had two wives - Asti and Prapti. They were sisters and were the daughters of a powerful king called Jarasandha. Jarasandha was seeing both his daughters widowed, was furious. He promised that he would avenge Kamsa, so matter what....
With a huge army, Jarasandha attacked Mathura, not once, not twice....but seventeen times! Every time Krishna and Balarama destroyed Jarasandha's army but for some inexplicable reason always left Jarasandha alive....
Jarasandha became more and more furious with each defeat....In the eighteenth time, Jarasandha took the help of Kalayavana,the King of Magadha to attack Mathura.
Krishna and Balarama discussed what had to be done....
Balarama spoke, 'Krishna! This is very bad! Both the armies have surrounded our kingdom! We cannot fight both the armies at the same time! Besides we also have to think of our people....We cannot just leave them helpless!'
Krishna nodded, 'I guess it was time, we used Dwaraka! This was the reason we built it, isn't it?'
Looking relieved Balarama nodded his head.
The people of Mathura were safely transported to Dwaraka, overnight. The city of Mathura was deserted....
After the people were safely removed from harm's way, a relaxed Dark Lord and Balarama discussed on what had to be done.
'What should we do now?' Balarama asked Krishna. 'We just cannot attack Kalayavana....He cannot be defeated by us! Can we call the help of our own friends?'
Krishna smiled, 'No brother! We do not need to run to our friends! I think this problem we can take care ourselves....'
Balarama looked enquiringly at Krishna. Krishna smiled and was about to explain, when their own army man came forward, 'Why can we not destroy Kalayavana? He is also a normal man. We have defeated Jarasandha seventeen times... Do you think we cannot do it the eighteenth time?'
Krishna smiled, 'You speak like this, because you don't know Kalayavana's story.'
The army man looked curiously at Krishna. The thought of defeat had not really occurred to him. With the Dark Lord, that was really not an option. 'What is Kalyavana's story?' He asked.
Krishna smiled, 'There were two great rishis Shyala, who was our family priest - the family priest of the Yadavas and Sage Gargya. When they were debating about a point, there broke out a quarrel between them...Gargya was so angry with Shyala, that he walked away with anger from the debate...'
The army man nodded wondering what the fight between two rishis would have to do with them. But he listened to the story attentively.
'Gargya walked away from the place and prayed to Lord Shiva. He prayed for twelve years and then Lord Shiva. Lord Shiva appeared before him, 'Son! Why did you perform such a powerful penance?'
Though 12 years had passed, Gargya's anger with the Yadavas had not reduced. In fact he was more angry than ever. Gargya with angry eyes looked at Lord Shiva, 'The Yadavas! I want to destroy them...'
Lord Shiva looked at Gargya with sad eyes. Such a good man had performed such a powerful penance and all he asked for was destruction....Lord Shiva took a deep breath and looked at Gargya and said, 'What boon do you seek, great rishi?'
Gargya did not understand the sadness within Lord Shiva because he was angry. He said angrily, 'I wish for a son, a son whom all the Yadavas would be afraid of!'
Krishna's army man slowly nodded his head. But then he did not understand, how the son of this rishi came into their problem...
He listened as the Dark Lord spoke, 'The son of that great rishi was black in complexion....black as a beetle....Because of this he was named Kalayavana!' The army man looked surprised as Krishna continued, 'Yes my man! The great rishi gave his son in adoption to King Yavasena, who did not have any children of his own!'
The army man nodded his head unhappily. Yavasena was the previous king of Magadha....Now Kalayavana was the king of Magadha, and he had a boon that could not be defeated by any Yadava....That meant even the Dark Lord could not defeat him!
-From the Bhagawat Puranam