Svaðilfari was owned by the disguised and unnamed hrimthurs, a jötunn, who built the walls of Asgard. According to the sagas, this jötunn offered to build a citadel to keep out invaders in exchange for Freyja, the sun, and the moon. The gods agreed, but said that he must complete the work in a single winter and with the aid of no man. The giant asked if his stallion Svaðilfari could help him, and with the advice of Loki, the gods agreed.
Because of the enormous strength of the horse, the giant made great progress and with only three days left before the deadline, the work had almost reached the gate of the stronghold. The gods blamed Loki and declared that, unless he devised a scheme to cause the builder to forfeit the payment, he would die a horrible death.
That same evening, Loki turned himself into a mare and lured Svaðilfari away into the woods. The giant chased after the stallion but was unable to catch him. As a result, the work was held up and the giant failed to complete the contract. He flew into a rage and the gods saw that he was one of the hated giants and they called for Thor, who smashed the builder's skull with a single blow of his hammer Mjöllnir. Some time later, Loki the mare gave birth to a foal, which was gray and had eight feet; named Sleipnir.