Known for his love of occassional michief, Loki once decided to pull a prank on Sif (Thor's wife). Sif was known for her glorious, golden locks. Loki waited until the Goddess was sleeping, and then proceeded to shear her head till she was bald. When Thor learned of his, his quick temper flared, and he seized Loki - threatening to break every bone in his body. Quick as always, Loki replied that he would make amends by traveling to Svartalfheim to see if the dwarves could make new hair for Sif, even more splendid than it had been before. Thor allowed this.
As Loki's travel neared completion, he came across two dwarves working the forge and anvil.The dwarves were brothers, Brokk and Eitri, the sons of Ivaldi and famous for their skill as craftsmen.They agreed to fabricate hair from gold, as fine as Sif's own hair.Once completed, they decided to make additional gifts to please and placate the gods. After they finished, Brokk presented Loki with three gifts: Sifs hair, a ship made for Freyr (which could sail on air and water, always gaining favorable winds), and a spear for Odin (which would never fail in its aim).
Loki, crafty as ever, praised the two for their work - and then began to taunt them, saying that Brokk's brother Eitri would surely not be able to make a finer treasure than the three he currently held. Brokk and Eitri then made a wager with Loki, that if they were able to craft a finer treasure they would take his head. Loki bet his head, though not his neck, and accepted the challenge. The two dwarves, who much disliked Loki's attitude, then set to work to humble the God.
Brokk began to work the bellows as Eitri used the hammer and tongs. Concerned that the two dwarves might actually succeed in their challenge, Loki decided to hinder their progress. He turned into a fly and flew down to where the two were working. He then bit Brokk on the hand, but to no avail before long the two dwarves had built a great boar made of gold. He then bit Brokk on the neck, but to no avail- before long the two dwarves had built a splendid gold ring. For a final distraction, Loki then bit Brokk on the eye lid. The dwarves persisted on until they had crafted a weapon fit for a God of war, the mighty hammer Mjollnir.
The dwarves emerged, taking all six of the treasures they had made, and brought Loki forth to Asgard to settle their bet before the Aesir. Odin was given his spear and the golden ring, Sif was given her hair, Freyr received his ship and the boar made of gold, and Thor was given his hammer Mjollnir. The Gods were gleeful, rightly praising Brokk and Eitri for their fine craftsmanship. Brokk then turned to Loki, ready to claim the Gods head as he was promised.
Loki attempted to flee, but Brokk pleaded with Thor to retrieve him. As the dwarf went to take his head, Loki slyfully pointed out that he had only promised the dwarves his head- not his neck- and therefore the dwarves could not decapitate him. Brokk was furious at having been tricked, but he was not defeated. To shame Loki for his bragging, and for his tricks, Brokk took a knife and a string and proceeded to sew Lokis mouth shut.