It took a shootout goal from David Desharnais to save the slumping Montreal Canadiens from having faces as red as their fabled jerseys.

After blowing a three-goal lead in the final 3:53 of regulation time, Desharnais got the only goal in the shootout as the Canadiens ended a five-game losing streak with a 5-4 victory over the Minnesota Wild on Thursday night.

Part of Habs heritage

Montreal Canadiens youngster Blake Geoffrion made history on Thursday night against the Minnesota Wild, taking the ice and becoming the fourth generation of his family to don a Habs jersey at home.

The Geoffrions are the first-ever family to have four generations play for the same squad in a North American sports organization.

Blake's grandfather is the legendary Hall of Famer Bernard (Boom Boom) Geoffrion, while the 24-year-old's great grandfather is another Canadiens icon, Howie Morenz. His father, Dan, also suited up for Montreal.

Blake wore No. 57, in honour of Boom Boom's No. 5 and Morenz's No. 7.

In 42 career games, the youngest Geoffrion, originally drafted 56th overall by Nashville in 2006, has six goals and five assists. He came over from the Predators in a deal that saw defenceman Hal Gill shipped to the Music City.

— CBC Sports 

"That was a strange one," said Montreal coach Randy Cunneyworth. "It wasn't textbook but those things happen. I'm just glad for the W."

Cruising in the final minutes of a one-sided game, the Canadiens shrugged when Matt Kassian made it 4-2 with his second goal of the game at 16:07 of the third frame.

With goalie Josh Harding pulled for an extra attacker, Dany Heatley made it a one-goal game with 1:43 left to play. Harding was still on the bench when Devin Setoguchi jammed in the equalizer with 10 seconds left to play.

Boos poured down from the seats for a team that has blown leads repeatedly this season.

"They were desperate," said Montreal goaltender Carey Price. "They came at us hard, threw pucks at the net and they got fortunate a couple of times. It happens. It was pretty wild. It was tough emotionally, I guess."

It all turned out well for the home side when Desharnais, who had a goal and two assists in regulation, beat Harding in the shootout. On Minnesota's last attempt, Setoguchi no doubt made highlight reels for the wrong reasons as he lost the puck and then fell without getting off a shot.

P.K. Subban, Lars Eller and Max Pacioretty scored as Montreal's 29th ranked power-play unit got three for the first time this season. Desharnais, who had three points, added one with both teams a man short.

The Canadiens next take on the visiting Toronto Maple Leafs on Saturday night.

Kassian scored his first two NHL goals for Minnesota (28-26-10), which is 3-7-3 in its last 13 games. Nick Johnson had three assists.  

Montreal (25-30-10) played the Wild for the first time since an 8-1 win in Minnesota last season sparked by a Subban hat trick.

Subban said the Wild seemed to gain momentum after Pacioretty was checked to the ice while skating in for what would have been an easy empty-net goal late in the third. There was no call in a game that had seen some diving earlier on.

"That was quite a game," said Wild coach Mike Yeo, whose team salvaged a point to move to five points behind Dallas for the eighth and final Western Conference playoff spot. "It's too bad we couldn't get that second point.

HNIC chat comment of the night

"this just in. carey price is now in the third row selling hot dogs"

—  i hate people

"I'm impressed with how our guys battled in the third. We overcame a lot of adversity. A tough call early and we were down 5-on-3 for quite some time. Then we lost our starting goalie. So we were in a hole."

A sellout of 21,273 was announced, but there were hundreds of empty seats on a snowy night for a Montreal squad that started the day in last place in the NHL Eastern Conference.

But it was an eventful game from the start as Ryan White and Stephane Veilleux squared off for a fight only 10 seconds in.

A couple of minor penalties later, including a high stick by Jed Ortmeyer that put Aaron Palushaj out of the game with a cut near an eye, Subban scored on a two-man advantage with a point blast at 2:33.

Only 19 seconds later, Wild goalie Niklas Backstrom seemed to pull something in a leg or groin and left the game in favour of Harding. Yeo said it was a lower body injury and could not say if it was serious.

Harding was beaten at 4:28 on Eller's first power-play goal as a Canadien.

Minnesota got one back as Alexei Emelin was knocked down in the crease, leaving Kassian open to poke in Darroll Powe's pass at 15:27. It was Kassian's first goal in 21 career NHL games.

White got another fighting major and a misconduct later in the period for throwing punches at Veilleux, who had slashed Price.

Pacioretty was on his off-wing to the right of Harding to put in his 26th of the season 11:59 into the middle frame.

Desharnais tapped in a Pacioretty rebound 8:50 into the third for his third goal in as many games.

Kassian, back in the lineup after sitting out two games, went to the net and banged in his own rebound with a backhander with 3:53 left to play to ignite the comeback.

Canadiens winger Brad Staubitz, claimed off waivers Monday, played against his former team.