Hedvig Sophia of Sweden (June 26, 1681–December 22, 1708), also known as Sofia, was the eldest child of King Charles XI and Ulrike Eleonore of Denmark. She was heiress presumptive to the Swedish throne from birth until her brother’s birth, and again from his accession in 1697 until her death. After her mother died in 1693, Hedvig Sophia and her siblings were raised under the care of their grandmother, Hedvig Eleonora. Her grandmother’s influence helped foster her opposition to Denmark, while her own interests included painting, fashion, and music.
In 1698, Hedvig Sophia married her cousin Frederick IV, Duke of Holstein-Gottorp, in a union arranged to strengthen Sweden’s alliance against Denmark. The marriage was unhappy, and she returned to Sweden in 1699 after about a year in Gottorp. She remained at the Swedish court, where she was known as “The Happy Princess” and became a prominent presence in its social life. She was also regarded as having political influence over her brother, King Charles XII.
After Frederick IV’s death in 1702, Hedvig Sophia became regent for their young son, Karl Friedrich. She entrusted the duchy’s daily administration to her late husband’s uncle, Christian August, while retaining authority over major decisions and maintaining its alliance with Sweden. In Sweden, she worked to secure her son’s position as a possible heir to the throne and led the political faction later known as the Holstein Party. She declined proposals for another arranged marriage and was publicly associated with the courtier Olof Gyllenborg.
Hedvig Sophia died of smallpox on December 22, 1708, after nursing her son through the illness. Her death deeply affected Charles XII, who received the news while abroad months later and initially refused to believe it. Her funeral and permanent interment at Riddarholm Church were delayed until 1718. When Charles XII died that year without heirs, her son was in line to succeed him, but her sister Ulrica Eleonora took the throne. Hedvig Sophia was also the paternal grandmother of Emperor Peter III of Russia.