The Danes are being demoted.
Nikita Jevpalovs scored the overtime-winner to lead Team Latvia to a 2-1 triumph in Wednesday's relegation-round match between two previously winless squads at the Saddledome.
With the victory, the Latvians earned an invitation to next year's world junior tournament in Russia, while Denmark will instead send a squad to the second-tier Division I event.
"I'm glad we won and stayed up," said Team Latvia captain Kristians Pelss, a member of the WHL's Edmonton Oil Kings. "It was our goal."
Pelss had the other tally for his team, while Oliver Bjorkstrand had Denmark's only goal.
USA WINS RELEGATION ROUND
It's probably little consolation, but Team USA won the relegation-round.
Austin Czarnik and Kevin Gravel each scored as the Americans earned a 2-1 victory over Switzerland in their final game at the latest instalment of the world junior tournament, finishing seventh in the standings.
Gaetan Haas replied for the Swiss, who settled for eighth.
Sven Baertschi, a first-round selection of the Calgary Flames, missed his fourth consecutive game for Switzerland after suffering a head/neck injury.