After the Æsir–Vanir war left Asgard's defences broken, a builder appeared with an offer: a wall no giant could breach, built in three half-years, price — Freyja, plus the sun and the moon. On Loki's counsel the gods countered with impossible terms: one winter, no help but his stallion. The builder agreed, and the gods swore oaths of safe-conduct. Then they watched the stallion Svaðilfari haul night-time stone at twice a horse's work, and the wall rise on schedule, and understood that they had gambled the sky's lights and the goddess of love on a labour estimate.
Three days from the deadline, the gods convened — not to pay, but to establish whose advice this had been. Loki, offered the choice between dying and voiding the contract, chose creatively: a mare in season broke from the woods that evening, and Svaðilfari's productivity ended. The builder flew into a giant's rage — revealing what the safe-conduct oaths had been protecting — 'and the oaths were disregarded': Thor's hammer arrived, and the builder's skull went 'in small crumbs.' Loki's absence concluded eleven months later with an eight-legged foal, Sleipnir, delivered to Odin as, presumably, an apology.
Völuspá treats the oath-breaking as a hinge of history: the seeress cites it in the ledger of guilt that ends at Ragnarök. The wall stood; the gods' word did not; the mythology counts the second cost as higher.
A city with a hole in its defenses
Snorri sets the scene at the very dawn of the gods' settlement — "when the gods had established Midgard and built Valhalla" — but the wall's ruin points back to the first war: Völuspá says plainly that in that fighting "the plank-wall of the Æsir's stronghold was broken." However you sequence it, Asgard stood open, and the beings it stood open to were the giants of Jötunheimr. Into this anxiety walked a smith — the sources call him simply the builder — with the perfect pitch: a fortification so good that no hill-giant or frost-giant could ever take the place, even if they came in over Midgard itself. Delivery in three half-years. His fee: Freyja as his wife — and he wanted the sun and the moon as well.
The price is the tell, and the gods half-read it. Only a giant prices in celestial bodies; taking the sun and moon out of the sky is not a wage but an apocalypse (at Ragnarök, wolves do exactly that). And Freyja is what giants always demand — Þrymr wants her for a stolen hammer, Hrungnir drunkenly threatens to carry her off. The gods went into council knowing the offer smelled, and came out having accepted it anyway — on conditions.
Loki's terms
The counter-offer was Loki's counsel, and its logic was pure: keep the prize, void the possibility. The builder would get his full price only if the wall were finished in a single winter; if anything remained undone on the first day of summer, he forfeited everything; and he was to have help from no man. The builder asked for one concession — the use of his stallion, Svaðilfari — and, "by Loki's advice," the gods granted it. Strong oaths were sworn on both sides, with many witnesses, for the builder said he could not be safe among the Æsir without a truce if Thor came home — the Thunderer was away east, hunting trolls. Every clause of this paragraph detonates later: the horse, the oaths, the absent hammer.
Then came the winter of watching. The builder hauled by night and built by day, and the stones the stallion drew staggered the gods — the horse did twice the deed of strength the builder did. The wall rose "high and strong" at a pace that turned the impossible schedule merely tight. With three days left and the wall all but done to the gateway, the gods sat down at their judgment-seats and asked one another the timeless question of committees facing the consequences of their own vote: whose idea was this? The answer was unanimous — Loki's, "who counsels most ill things" — and so was the remedy: he would die a bad death unless he found a way for the builder to lose his wage. They laid hands on him to underline the point.
A mare in the woods
Loki, sworn and terrified, solved the problem in the only way the terms allowed. The contract barred men from helping — it said nothing about horses hindering. That evening, as Svaðilfari hauled stone, a mare ran out of the woods and whinnied at him. The stallion went frantic, snapped his traces, and ran for the wood; the builder chased them all night; and the work stood still. When the builder saw the deadline could no longer be made, he fell into jötunmóðr — giant's fury — and the disguise fell with it: the master-smith was a mountain-giant all along, exactly as the gods had suspected from his invoice.
What the safe-conduct oaths had been protecting now stood revealed, and Snorri's next sentence is the whole myth in miniature: the oaths were not honored. The gods called on Thor, who came at once, "and next the hammer Mjölnir was aloft." The builder was paid, Snorri says with terrible cheer, not with the sun and moon but with the first blow — which broke his skull "into small crumbs" and sent him down to Niflhel. Not even residence in the wall he built.
Loki's part had a coda. The mare, of course, had been Loki — "such dealings had he had with Svaðilfari," Snorri writes, at his driest — and "somewhat later" the trickster bore a foal: grey, and eight-legged. This was Sleipnir, "the best horse among gods and men," given to Odin, who rides him ever after — down the Hel-road to wake a dead seeress for Baldr's sake, and everywhere else the mythology needs its fastest traffic between worlds. The gods' greatest treasure-horse is the living receipt of their crookedest contract; the mythology never tires of that kind of accounting.
The oath the seeress remembered
Snorri could have ended on the punchline. Völuspá does not. The seeress, running through the ages of the world, remembers the council where the gods debated who had mixed the air with treachery and given Óðr's maiden — Freyja — to the giant race; and then Thor, "swollen with rage," striking, for "oaths were trampled, words and swearing, every binding pledge that had passed between them." In the poem's architecture, this stanza belongs to the ledger of guilt — Gullveig's burning, the broken wall, the broken word — that runs downhill to Ragnarök. The wall episode is where the gods, who bound the wolf with a false pledge and would break faith again, first put oath-breaking on the record as policy. The mythology is unsparing about the trade: Asgard got its fortification, and the moral world of the gods got its first structural crack. Of the two walls, the second was the one that mattered.
It is worth noticing who pays and who profits. The giant, whose offer was outrageous, works honestly to his contract and is murdered at the point of default. The gods, who never intended to pay, keep the wall, the goddess, the sky's lights, and the foal. Only Völuspá files the complaint — and the settlement date it names is the end of the world.
In the primary sources
The connected story is Snorri's, in Gylfaginning (Prose Edda), told to explain the question "who owns the horse Sleipnir?" — Snorri's frame-narrator remarks that Sleipnir's origin is a tale worth telling, and he is right. Völuspá (Poetic Edda) preserves the older witness: two dense stanzas about the treacherous bargaining away of Freyja, Thor's rage, and the trampled oaths — with no builder's name, no horse, and no Loki. Whether the poem knows the same story Snorri tells, or a starker variant in which the gods' guilt was even less adorned, cannot be settled; Snorri was likely working partly from those stanzas, stitching them to a folktale plot. And it is a folktale plot: the "master builder" who demands an impossible price (often the sun and moon, or a saint's eyes) and is cheated at the deadline survives in later Scandinavian church-building legends, where a troll builds the church and is undone by a trick — stories collected centuries after Snorri that run on the same engine. Which came first, myth or migratory legend, is a classic of the scholarship; what is certain is that only in the Norse version does the cheated builder's case get docketed for the apocalypse.
Frequently asked questions
Who built the wall around Asgard?
An unnamed master-builder who turned out to be a mountain-giant in disguise, working with his prodigious stallion Svaðilfari. He demanded Freyja, the sun, and the moon as payment for a wall no giant could breach.
How did the gods get out of paying?
On Loki's advice they had set impossible terms — one winter, no helper but the horse. When the builder looked like finishing anyway, they forced Loki to sabotage the work: he became a mare and lured Svaðilfari away, the deadline was missed, and when the enraged builder revealed his giant nature, Thor killed him with Mjölnir despite the oaths of safe-conduct.
Is Sleipnir really Loki's child?
Yes. Loki, in mare's shape, conceived by the stallion Svaðilfari and later gave birth to the grey, eight-legged foal Sleipnir — "the best horse among gods and men" — which he gave to Odin. Loki is Sleipnir's mother, a fact Odin himself alludes to as an insult in the Eddic poetry.
Why does Völuspá mention the broken oaths?
The seeress lists the episode — Freyja nearly bartered to the giants, Thor's rage, "oaths trampled, words and swearing" — in her catalogue of the gods' guilt on the road to Ragnarök. In the poem's moral accounting, the gods' broken word costs more than the wall was worth.
Did the builder ever get anything?
No. He was killed at the point of default — Snorri notes grimly that instead of the sun and moon, his payment was the first hammer-blow, which shattered his skull and sent him to Niflhel.
Where is this story told?
In full only in Gylfaginning (Prose Edda), where it explains Sleipnir's origin. Völuspá preserves two older stanzas about the bargain and the broken oaths. The plot resembles later Scandinavian "master builder" legends, where a troll builds a church and is cheated of his price.