The gods feared that the frost giants would invade Asgard while Thor was away fighting monsters.
Often they spoke together of the danger. One day Loke advised them to hire a workman whom he knew, to build a fort strong enough to keep out the frost giants.
The gods listened to him, although they knew he seldom gave good advice.
The workman was brought into Asgard. Very strange wages he demanded. He said he would build the fort if they would give him Freyja, or the sun and moon, when it was finished.
The gods agreed to this. But they said he should have nothing if the fort were not finished by the first day of summer.
The workman said he would do the work if he could have Svadilf are, his horse, to draw the stones.
On the first day of winter he began the work, and worked night and day. At this the gods were frightened. They feared the fort would be finished on the first day of summer. Sure enough, three days before the first day of summer only one pillar was unfinished.
Seeing this, the gods threatened to kill Loke if he did not find a way out of the difficulty. They could not give Freyja. If they gave the sun and moon, everything would be in darkness.
But on the last night Loke changed himself into a monster and ran out of the woods before Svadilfare. The horse was so frightened that he ran away. The workman was forced to go after him. So the fort was not finished.
Seeing that he could not get his reward, the workman became a giant, as he really was, and Thor struck him dead with his hammer.