Norway’s Heidi Weng captured bronze in the race, which features 10km of classic skiing followed by a 10km freestyle.
Karlsson and Andersson raced closely together in the classic portion of the race in a quartet dominated by Scandinavian skiers, but broke away as the freestyle segment got underway. Karlsson finished a full 51 seconds ahead of the other racers, with time to grab the Swedish flag before crossing the finish line.
”That was the moment when it hit me. I was like, ’OK, this is for real’, said Karlsson.
"I had so much fun out there today and I am really proud of my whole team who have made this happen. The skis were super and the body felt amazing."
Third-place finisher Weng came in almost one minute and 27 seconds behind Karlsson.
The win marks the first individual medal for 26-year-old Karlsson, who took home a bronze in the women's relay at the 2022 Beijing Olympics.
World Cup leader Jessie Diggins of the US, seen as a contender for a podium spot, fell on a sharp downhill turn early in the race in a crash that also took out Norway’s Karoline Simpson-Larsen, and failed to catch up to the leading packs.
Diggins trailed at 14th in the classic part of the race, but made up time on the freestyle, her strongest discipline, to finish eighth.
"I was really, really encouraged by the skate half but the classic half, the things out of my control, did not go very well," Diggins told reporters.
She added that the crash was not the biggest problem in the race, but said it was a difficult place to fall.
"Unfortunately, it was a tough spot where you lose all your momentum," she said.
