Once on a time, when the gods were constructing their abodes and had already finished Midgard and Valhalla, a certain artificer came and offered to build them a residence so well fortified that they should be perfectly safe from the incursions of the Frost giants and the giants of the mountains. But he demanded for his reward the goddess Freya, together with the sun and moon. The gods yielded to his terms, provided he would finish the whole work himself without any one’s assistance, and all within the space of one winter. But if anything remained unfinished on the first day of summer he should forfeit the recompense agreed on. On being told these terms the artificer stipulated that he should be allowed the use of his horse Svadilfari, and this by the advice of Loki was granted to him. He accordingly set to work on the first day of winter, and during the night let his horse draw stone for the building. The enormous size of the stones struck the gods with astonishment, and they saw clearly that the horse did one-half more of the toilsome work than his master. Their bargain, however, had been concluded, and confirmed by solemn oaths, for without these precautions a giant would not have thought himself safe among the gods, especially when Thor should return from an expedition he had then undertaken against the evil demons.
As the winter drew to a close, the building was far advanced, and the bulwarks were sufficiently high and massive to render the place impregnable. In short, when it wanted but three days to summer, the only part that remained to be finished was the gateway. Then sat the gods on their seats of justice and entered into consultation, inquiring of one another who among them could have advised to give Freya away, or to plunge the heavens in darkness by permitting the giant to carry away the sun and the moon.
They all agreed that no one but Loki, the author of so many evil deeds, could have given such bad counsel, and that he should be put to a cruel death if he did not contrive some way to prevent the artificer from completing his task and obtaining the stipulated recompense. They proceeded to lay hands on Loki, who in his fright promised upon oath that, let it cost him what it would, he would so manage matters that the man should lose his reward. That very night when the man went with Svadilfari for building stone, a mare suddenly ran out of a forest and began to neigh. The horse thereat broke loose and ran after the mare into the forest, which obliged the man also to run after his horse, and thus between one and another the whole night was lost, so that at dawn the work had not made the usual progress. The man, seeing that he must fail of completing his task, resumed his own gigantic stature, and the gods now clearly perceived that it was in reality a mountain giant who had come amongst them. Feeling no longer bound by their oaths, they called on Thor, who immediately ran to their assistance, and lifting up his mallet, paid the workman his wages, not with the sun and moon, and not even by sending him back to Jotunheim, for with the first blow he shattered the giant’s skull to pieces and hurled him headlong into Niffleheim.