Last team standing wins.

The marathon game saw star players from both teams exit because of injuries and trainers on both sides work furiously to get them back on the ice. It finally ended with Nick Poehling’s power-play goal at 8:26 of the second overtime, giving second-seeded Lakeville North a 5-4 victory over No. 3 seed Eden Prairie (18-8-3) in the semifinals of the Class 2A boys’ hockey tournament and putting the Panthers (24-4-1) in the state championship game for the first time in the program’s history.

“For Lakeville North right now, every step forward we take is a first,” Panthers coach Trent Eigner said. “It takes a special group of kids to forge a new path.”

A shot from the point glanced off a stick in the direction of Poehling, who raced to the puck from the right faceoff circle and whipped in a shot before Eden Prairie goaltender Jake Gerdes could slide across the crease.

“In overtime, you are just trying to get a puck on net,” Poehling said. “Any shot can go in. And that one went in.”

The game’s drama extended well beyond the multiple overtimes, Poehling’s clutch goal and Lakeville North’s historic tournament run. Eden Prairie defenseman and Mr. Hockey finalist Luc Snuggerud, already playing despite a broken hand and in the midst of a superb performance, exited in the second overtime because of leg cramps. He did not return.

“He was coming off the ice wailing and trying to find enough energy to play,” Eden Prairie coach Lee Smith said of Snuggerud, who at one point toppled over the boards and fell backward into the Eagles’ bench area.

Fellow Eagles Mr. Hockey finalist Steven Spinner, who scored twice on rocket shots just under the crossbar, was hit in the neck by a shot early in the first overtime. He returned for the start of the second overtime after receiving treatment.

The injury report wasn’t much better for Lakeville North. Standout senior forward Tristen Hazlett exited late because of a knee injury. Defenseman Jack McNeely also was hurt in the second overtime.

“You guys watched it, for both sides, it kind of turned into a M.A.S.H. unit out there late,” Eigner said.