Halfdan the Valiant (Hálfdan snjalli) (7th century?) was a legendary Scanian prince, who was the father of Ivar Vidfamne according to Hervarar saga, the Ynglinga saga, Njal's Saga and Hversu Noregr byggdist. The genealogical work Hversu Noregr byggdist gives his father as Harald the Old, his grandfather as Valdar and his great-grandfather as Hróarr (i.e. the Hroðgar of Beowulf).
Ynglingasaga, authored by Snorri Sturluson in c. 1230, relates that the Swedish king Ingjald Ill-ruler married his daughter Åsa to king Guðröðr of Scania. Åsa was her father's daughter and made Guðröðr murder his own brother Halfdan, the father of Ivar Vidfamne. As it seems, Ivar had to flee Scania after his father's death. Later, she was the cause behind Guðröðr's death as well, and was forced to escape back to her father. People afterwards called her Åsa Ill-ruler similar to her father Ingjald.
Now Ivar Vidfamne hastily returned to Scania. He mustered a large army and approached Ingjald and his daughter at a place in Svithiod called Ræning. Seeing themselves unable to fight the Scanians, the two committed suicide by burning themselves to death inside the hall. Ivar then subjugated large parts of the Baltic region.
Whereas Ynglinga saga does not inform about Halfdan's mother, Hervarar saga provides the information that she was called Hild, the daughter of the Gothic king Heiðrekr Ulfhamr, the son of Angantyr who defeated the Huns. However, another source, Hversu Noregr byggdist, gives the name of Halfdan's mother, spouse of Harald the Old, as Hervor, daughter of Heiðrekr.
Hervarar saga then tells that Halfdan had the son Ivar Vidfamne, who attacked Ingjald Ill-ruler, which led to Ingjald's suicide by burning down his own hall at Ræning together with all his retinue. After this, Ivar Vidfamne conquered Sweden.