TORONTO - Michel Therrien knew his team's efforts would pay off if they kept to the game plan.

The Canadiens blew a two-goal lead but held on to snap a five-game skid with just the fifth win in their last 22 games after beating the Toronto Maple Leafs 3-2 in a shootout Saturday.

"I liked the way we were engaged when we started the game and we were dictating the game," Therrien said. "There's a lot of times when we got good starts... but finally (we) got rewarded."

Lars Eller scored the eventual shootout winner in the fifth round for Montreal (24-20-4). David Desharnais and Tomas Fleischmann each scored their ninth of the season in the first period.

Toronto (17-20-9) battled back to tie it 2-2 on goals from Nazem Kadri and Joffrey Lupul, but the Habs didn't break.

"The spirit was good because we liked the way we were playing," Therrien said of losing the two-goal lead. "We still got to fight and still got to play the way we're supposed to play and when you're doing good things, and playing the right way, you hope at the end you're going to get rewards."

Therrien was especially pleased with his team's defensive efforts — holding the Leafs to just 15 shots through 60 minutes.

"We played tight, and after three periods, we only gave up 15 shots, it's pretty amazing. It's a great accomplishment for a team in the NHL to just allow 15 shots and then Michael Condon was good.

"There's not much he could've done on those goals."

It appeared the Habs would once again be the victim of not getting the timely bounces.

Midway through the third, with the game tied 2-2, Brendan Gallagher had thought he'd given his team the lead. Replay, however, showed the puck hit the post behind James Reimer's glove side, rolled through the crease, hit the other post and glided back to Reimer to smother for a whistle.

Gallagher joked he needed to get the ice measured to ensure it was flat.

"I was shocked it didn't go in, I was standing there, I thought I saw it… I literally thought I saw it in," Gallagher said. "All the fans behind the net told me it was a goal too so… they lied to me."

With the win, Montreal is now 5-16-1 in its last 22 and has scored two or fewer in 16 of those games.

"It's a good two points," said Canadiens captain Max Pacioretty, who prolonged the shootout with his goal in the third round. "We know that there's areas to improve.

"We know we played a lot of better games during our losing stretch than we played tonight, but I really feel like we deserved those two points and hopefully it jump-starts something."

Montreal continues its brief two-game road trip on Monday when they visit the Columbus Blue Jackets.