When Mathurā was thus besieged, Lord Śrī Kṛṣṇa began to consider, in consultation with Baladeva, how much the Yadu dynasty was in distress, being threatened by the attacks of two formidable enemies, Jarāsandha and Kālayavana. Time was growing short. Kālayavana was already besieging Mathurā from all sides, and it was expected that the day after next, Jarāsandha would also come, equipped with the same number of divisions of soldiers as in his previous seventeen attempts. Kṛṣṇa was certain that Jarāsandha would take advantage of the opportunity to capture Mathurā when it was also being besieged by Kālayavana. He therefore thought it wise to take precautionary measures for defending against an attack upon Mathurā from two strategic points. If both Kṛṣṇa and Balarāma were engaged in fighting with Kālayavana at one place, Jarāsandha might come at another to attack the whole Yadu family and take his revenge. Jarāsandha 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. Kṛṣṇa therefore decided to construct a formidable fort 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 the enemy. It appears that formerly Dvārakā was also part of the kingdom of Mathurā. In Śrīmad-Bhāgavatam it is stated that Kṛṣṇa constructed the fort in the midst of the sea. Remnants of the fort Kṛṣṇa constructed still exist in the Bay of Dvārakā.
Kṛṣṇa 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 Viśvakarmā. No ordinary architect could construct such a fort within the sea, but an architect like Viśvakarmā, who is considered to be the engineer among the demigods, can execute such wonderful craftsmanship anywhere in the universe. If huge planets can float in weightlessness in outer space by the arrangement of the Supreme Personality of Godhead, surely the architectural construction of a fort covering ninety-six square miles within the sea was not very wonderful.
It is stated in Śrīmad-Bhāgavatam that this new, well-constructed city, developed within the sea, had regular planned roads, streets and lanes. There were also well-planned parks and gardens filled with plants known as kalpa-vṛkṣas, or desire trees. These desire trees are not like the ordinary trees of the material world; the desire trees are found in the spiritual world. By Kṛṣṇa’s supreme will, everything is possible, so such desire trees were planted in Dvārakā, the city constructed by Kṛṣṇa. The city was also filled with many palaces and gopuras, or big gates. These gopuras are still found in some of the larger temples. They are very high and constructed with fine artistic skill. Such palaces and gates held golden waterpots (kalaśas). These waterpots on the gates or on the palaces are considered auspicious signs.
Almost all the palaces were skyscrapers. In each and every house there were underground rooms containing big golden and silver pots for stocking grain. And there were many golden waterpots within the rooms. The bedrooms were all bedecked with jewels, and the floors were mosaic pavements of marakata jewels. The Viṣṇu Deity, worshiped by the descendants of Yadu, was installed in each house in the city. The residential quarters were so arranged that the different castes—brāhmaṇas, kṣatriyas, vaiśyas and śūdras—had their respective quarters. It appears from this that the caste system mentioned in the Bhagavad-gītā existed even at that time. In the center of the city was a residence made specifically for King Ugrasena. This was the most dazzling of all the houses.
When the demigod Indra saw that Kṛṣṇa was constructing a particular city of His own choice, he sent the celebrated pārijāta tree of the heavenly planets to be planted in the new city, and he also sent a parliamentary house, Sudharmā. The specific quality of this assembly house was that anyone participating in a meeting within it would overcome the influence of invalidity due to old age. The demigod Varuṇa presented a horse, which was all white except for black ears and which could run at the speed of the mind. Kuvera, the treasurer of the demigods, presented the art of attaining the eight perfectional stages of material opulence. In this way, all the demigods began to present their respective gifts according to their different capacities. There are thirty-three million demigods, each entrusted with a particular department of universal management. All the demigods took the opportunity of the Supreme Personality of Godhead’s constructing a city of His own choice to present their respective gifts, making the city of Dvārakā unique within the universe. This proves that while there are undoubtedly innumerable demigods, none of them is independent of Kṛṣṇa. As stated in the Caitanya-caritāmṛta, Kṛṣṇa is the supreme master, and all others are His servants. So all the demigods took the opportunity to render service to Kṛṣṇa when He was personally present within this universe. This example should be followed by all, especially those who are Kṛṣṇa conscious, for they should serve Kṛṣṇa by their respective abilities.