One day, an itinerant stonemason named Blast came to Asgard and offered to rebuild the wall if the goddess Freya would consent to be his wife. He asked for the sun and the moon as well. The gods wanted the wall rebuilt but the terms stated by the mason were outrageous. However, the god Loki proposed a way of outwitting the mason and getting at least part of the wall rebuilt for nothing. The gods agreed to the payment asked by the mason, but only if the work was completed within six months. The mason insisted that he be allowed to use his stallion, Svadilfari, in rebuilding the wall.
The work proceeded much more rapidly than the gods had anticipated and they began to worry that the mason might have to be paid after all. The god Odin threatened to kill Loki if the wall was completed within the allotted time. Loki saw that the mason's horse was doing the heavy hauling and he devised a plan to deprive the mason of the help of his horse. Taking the form of a young mare, Loki lured the stallion into a thicket and made sure that he remained there until the next day. When Svadilfari returned to his master it was too late to complete the work. The mason became so angry that he revealed his true form, that of a rock giant. The god Thor dispatched the giant with a mighty blow of his hammer, Mjollnir.
Months later, Loki returned to Asgard. He brought with him a gray colt with eight legs, the foal of Loki the mare and Svadilfari the stallion. He gave it to Odin, saying that its name was Sleipnir. The colt could travel over land and sea and through the air.