BOSTON - Brad Marchand's goal-scoring drought was extended only temporarily.

After losing an apparent goal to a coach's challenge midway through the third period, Marchand scored one that was undisputed with just 47 seconds left to play to lift the Boston Bruins to a 3-2 win over the Toronto Maple Leafs on Saturday night.

"He showed some character just staying with it and not getting frustrated," said Patrice Bergeron, who scored Boston's first two goals. "He got a huge goal that we needed."

Bergeron nearly had an assist to go with his two goals, but his setup to Marchand for a one-timer from in front of the crease was nullified when Toronto coach Mike Babcock successfully challenged the play.

Babcock thought Marchand was inside the blue line just before Bergeron brought the puck in and fed Marchand with a perfect pass for what briefly stood as the go-ahead goal at 7:23 in the third. After several minutes of video replays, the officials upheld Babcock's challenge and the 2-all tie stood until Marchand scored unassisted inside the final minute.

"It was frustrating having that one called back," Marchand said. "I thought we played really well after that and it was great that we were able to get the win."

It was Marchand's first goal since scoring against Edmonton on Dec. 14, a span that included a three-game suspension for an illegal hit on Ottawa's Mark Borowiecki on Dec. 29.

Leo Komarov and Shawn Matthias scored for Toronto which lost its fifth straight. The Maple Leafs have been outscored 19-5 during their losing streak, including a 4-1 loss at home to Chicago on Friday night.

Jonathan Bernier kept the Leafs close with 42 saves, but Toronto couldn't overcome going 0 for 5 on the power play.

"I really thought we had her moving big time but you got to score," Babcock said. "It's great to move it around and get quality chances but you got to find a way to fire the odd one in the net."

Tuukka Rask stopped 26 shots for Boston, although teammate Torey Krug had the save of the night with less than three minutes remaining in the third. Toronto's Pierre-Alexandre Parenteau beat Rask to a loose puck and had the Boston goalie well out of position, but Krug saw the play developing and got to the crease in time to get in front of the shot.

"He's bailed me out plenty of times over my career," Krug said of Rask. "Right place, right time. Nothing more than that."

The Bruins never trailed, but also failed to hang on after taking leads of 1-0 and 2-1 on goals by Bergeron.

"It felt like a playoff game almost," Matthias said. "Back and forth, lots of chances, both teams working hard. ... It's just unfortunate that it ends that way in the last minute."

Bergeron scored on a breakaway just 45 seconds into the game, then struck again in the opening minute of the second period to give the Bruins a 2-1 lead when he tipped in Zdeno Chara's slap shot from the point 39 seconds into the period.

Komarov tied it at 1-all when he tapped in a rebound 4:31 into the first period. Nazem Kadri and Dion Phaneuf assisted on the goal, which came with 38 seconds remaining on a 4-on-4 as Marchand and Toronto's Jake Gardiner sat in the penalty box for high-sticking each other.

Matthias tied it again with 2:44 left in the second period after Tyler Bozak stole the puck from Chara in the corner. Boston coach Claude Julien argued Bozak, who had the only assist, tripped up Chara with his stick.

NOTES: Bruins fans cheered late in the first period when the scoreboard showed the New England Patriots beat the Kansas City Chiefs 27-20 in the NFL playoffs. ... Toronto allowed 40 or more shots for the fourth time in eight games. ... Bernier stopped 17 of 18 shots in the first period. ... Bergeron and Marchand entered the game tied for the Bruins' lead with 15 goals apiece.