Kalayavana, the King of Magadha and Salva attacked the city of Mathura at the same time that Jarasandha attempted to attack it for the eighteenth time. Kalayavana was very anxious to declare war on a king of the world who would be a suitable combatant for him, but he had not found any. However, being informed about Mathura by Narada, he thought it wise to attack this city. When he attacked Mathura he brought with him thirty million Yavana soldiers. When Mathura was thus besieged, Lord Sri Krsna began to consider how much the Yadu dynasty was in distress, being threatened by the attacks of two formidable enemies, Jarasandha and Kalayavana.
Time was growing very short. Kalayavana was already besieging Mathura from all sides, and it was expected that the next day Jarasandha would also come, equipped with the same number of divisions of soldiers as in his previous seventeen attempts. Krsna was certain that Jarasandha would take advantage of the opportunity to capture Mathura when it was also being besieged by Kalayavana. He therefore thought it wise to take precautionary measures to defend the strategic points of Mathura. If both Krsna and Balarama were engaged in fighting with Kalayavana at one place, Jarasandha might come at another place to attack the whole Yadu family and take his revenge.
Jarasandha was very powerful, and having been defeated seventeen times, he might vengefully kill the members of the Yadu family or arrest them and take them to his kingdom. Krsna therefore decided to construct a formidable fort in a place where no two-legged animal, either man or demon, could enter. He decided to keep His relatives there so that He would then be free to fight with the enemy. It appears that formerly Dvaraka was also part of the kingdom of Mathura, because in the Srimad-Bhagavatam it is stated that Krsna constructed a fort in the midst of the sea. Remnants of the fort which Krsna constructed are still existing in the Bay of Dvaraka.
He first of all constructed a very strong wall covering ninety-six square miles, and the wall itself was within the sea. It was certainly wonderful and was planned and constructed by Visvakarma. No ordinary architect could construct such a fort within the sea, but an architect like Visvakarma, who is considered to be the engineer among the demigods, can execute such wonderful craftsmanship anywhere in any part of the universe.
….When the new city was fully constructed according to plan, Krsna transferred all the inhabitants of Mathura and entrusted Sri Balarama as the city father. After this He consulted with Balarama, and being garlanded with lotus flowers, He came out of the city to meet Kalayavana, who had already seized Mathura without taking up any weapons.
When Krsna came out of the city, Kalayavana, who had never seen Krsna before, saw Him to be extraordinarily beautiful, dressed in yellow garments. Passing through his assembly of soldiers, Krsna appeared like the moon in the sky passing through the assembled clouds. Kalayavana was fortunate enough to see the lines of Srivatsa, a particular impression on the chest of Sri Krsna, and the Kaustubha jewel which He was wearing. Kalayavana saw Him, however, in His Visnu form, with a well-built body, with four hands, and eyes like the newly blooming lotus petals. Krsna appeared blissful, with a handsome forehead and beautiful face, with smiling restless eyes and moving earrings.
Before seeing Krsna, Kalayavana had heard about Him from Narada, and now the descriptions of Narada were confirmed. He noticed Krsna’s specific marks and the jewels on His chest, His beautiful garland of lotus flowers, His lotus-like eyes and similar beautiful bodily features. He concluded that this beautiful personality must be Vasudeva, because every description of Narada’s which he has heard previously was substantiated by the presence of Krsna. Kalayavana was very much astonished to see that He was passing through without any weapon in His hands and without any chariot. He was simply walking on foot. Kalayavana had come to fight with Krsna, and yet he had sufficient principles not to take up any kind of weapon. He decided to fight with Him hand to hand. Thus he prepared to capture Krsna and fight.
Krsna, however, went ahead without looking at Kalayavana, and Kalayavana began to follow Him with a desire to capture Him. But in spite of all his swift running, he could not capture Krsna. Krsna cannot be captured even by the mental speed attained by great yogis. He can be captured only by devotional service, and Kalayavana was not practiced in devotional service. He wanted to capture Krsna, and as he could not do so he was following Him from behind.
Kalayavana began running very fast, and he was thinking, “Now I am nearer; I will capture Him,” but he could not. Krsna led him far away, and He entered the cave of a hill. Kalayavana thought that Krsna was trying to avoid fighting with him and was therefore taking shelter of the cave. He began to chastise Him with the following words: “O You, Krsna! I heard that You are a great hero born in the dynasty of Yadu, but I see that You are verily running away from fighting, like a coward. It is not worthy of Your good name and family tradition.” Kalayavana was following, running very fast, but still he could not catch Krsna because he was not freed from all contaminations of sinful life.
When Krsna entered the cave of the hill, Kalayavana followed, chastising Him with various harsh words. Krsna suddenly disappeared from the demon’s sight, but Kalayavana followed and also entered the cave. The first thing he saw was a man lying down asleep within the cave. Kalayavana was very anxious to fight with Krsna, and when he could not see Krsna but, instead saw only a man lying down(King Mucukunda), he thought that Krsna was sleeping within this cave.
Kalayavana was very puffed up and proud of his strength, and he thought Krsna was avoiding the fight. Therefore, he very strongly kicked the sleeping man, thinking him to be Krsna. The sleeping man had been lying down for a very long time. When he was awakened by the kicking of Kalayavana he immediately opened his eyes and began to look around in all directions. At last he began to see Kalayavana, who was standing nearby. The man was untimely awakened and therefore very angry, and when he looked upon Kalayavana in his angry mood, rays of fire emanated from his eyes, and Kalayavana burned into ashes within a moment.”
Krsna Book, Chapter 50 — with Srilan Srisukumaran.