ST PAUL, MN - APRIL 24: Mattias Janmark #13 of the Dallas Stars passes the puck away from Ryan Suter #20 of the Minnesota Wild during the second period of Game Six of the Western Conference Quarterfinals during the 2016 NHL Stanley Cup Playoffs on April 24, 2016 at Xcel Energy Center in St Paul, Minnesota. (Photo by Hannah Foslien/Getty Images)

Follow CBSDFW.COM: Facebook | Twitter

ST. PAUL, MN (AP) – The Dallas Stars were cruising into the second round, dominating their slumbering opponent, when the Minnesota Wild jolted awake.

Minnesota’s remarkable rally ended a fraction of an inch short, a fitting metaphor for an intensely up-and-down season. Dallas advanced in the playoffs for the first time in eight years, extracting some valuable experience from a nerve-racking finish.

Jason Spezza scored his fourth goal of the series and added three assists, and goalie Kari Lehtonen and the Stars needed every last one of them to hold off the Wild 5-4 on Sunday and wrap up the first-round series in six games.

“A lot of respect for what Minnesota can do on their side,” said Patrick Sharp, who had one of three first-period goals for Dallas. “It was a tough series, but we’re happy about moving on.”

John Klingberg, Jamie Benn and Alex Goligoski also scored for the Stars, who will face the winner of the Chicago-St. Louis series, which is tied at 3. The Blues host the Blackhawks in their decisive Game 7 on Monday night.

Jared Spurgeon scored two of Minnesota’s four third-period goals, both on the power play, and the Wild nearly tied the game with 34 seconds remaining when Nino Niederreiter whacked at a loose puck in the crease.

Freeze-frame replays showed it in the net, but not quite fully across the goal line as it connected with Lehtonen’s right pad, an oh-so-close call that was upheld by review. Another angle revealed the puck taking a slight hop, which might have put it all the way in, but it was awfully difficult to determine.

“It seems like it always comes down to that: inches, a fluky play, whatever you want to call it,” Wild center Charlie Coyle said. “It’s crazy. It was right there.”

At the end of a sleepy second period, with the Wild and their fans seeming more than ready for summer vacation, Benn put the Stars in front 4-0 on his top-shelf shot with 24 seconds remaining until the break. Benn had two assists and finished with 10 points in the series.

But the Wild weren’t ready to pack it in, as they proved during the torrid 20 minutes that followed.

“It was fun. It was a blast,” Wild coach John Torchetti said, “but we didn’t get the job done.”

The Wild squeezed months of drama into one final period after waking up from a figurative afternoon nap during the first 40 minutes of the game. Spurgeon and Jonas Brodin scored 16 seconds apart, pulling the Wild to 4-2 with 15-plus minutes to play.

In one of many odes to Minnesota’s late musical prodigy Prince, the song “Let’s Go Crazy” played on the arena system after each score by the Wild, who put 16 shots on goal in the third period. Lehtonen finished with 25 saves and a 3-1 record in the series, but the Stars were all out of sorts down the stretch.

“Obviously, it’s tough when they get the crowd going. They were pretty loud. But I think we were pretty calm the whole game,” said Klingberg, who knocked in a one-timer from Spezza during a 5-on-3 just 5:56 into the game after Coyle was called for elbowing Jason Demers and Marco Scandella’s high stick hit Sharp in the face.

Those early goals added up, too, because the Stars only needed one more to seal it. They got a friendly bounce when Goligoski’s shot bounced around the goal mouth and Dubnyk didn’t see it beneath him. Coyle lunged to try to keep it out, but the puck glanced off Dubnyk and in for a 5-3 lead with 9:32 remaining.

“That makes you feel sick to have to lose a game and a series on a bouncer like that,” said Dubnyk, who stopped 19 shots.

Jason Pominville slammed in a rebound with 4:47 left, setting up the frantic final flurry.

“You have to win a series before you become a better team,” Stars coach Lindy Ruff said, “and we’ll become a better team.”

(© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)