BOSTON (AP) The Toronto Maple Leafs have grown accustomed to playoff disappointment in recent years.

However, after putting together possibly their best defensive effort of the season, their latest victory has them on the brink of getting out of the first round for the first time since 2004.

Auston Matthews broke a scoreless tie in the third period, Kasperi Kapanen added another goal and the Maple Leafs held on to beat the Boston Bruins 2-1 Friday night and take a 3-2 lead in their first-round playoff series.

With the goalie pulled for an extra skater, David Krejci got the Bruins on the board with 43.7 seconds left, but Boston couldn't tie it up.

The Maple Leafs, who have alternated wins and losses in the first five games, now have a chance to close out the series when it shifts back to Toronto for Game 6 on Sunday.

"Total team victory," Toronto's Zach Hyman said. "Guys were battling. It took a full 60 to get it done, but we got it done"

Boston failed to convert on its three power plays, and Toronto was 0 for 1.

"Defensively the ice was tough," Toronto coach Mike Babcock said. "It was humid in the building. ... But I thought our guys kept grinding and stayed patient. We didn't get in our own way tonight."

The Maple Leafs' goals broke up what had been a defense-dominated game for 2 1/2 periods.

Matthews' fourth goal of the postseason came after he took a feed from Jake Muzzin and found an open corner of the net on a slap shot with 8:27 left. The Bruins challenged Matthews' goal, arguing that Rask was interfered with, but the goal was upheld after a review.

"I guess you really just hope for the best," Matthews said. "I never really got a good look at it, but I'm fortunate that they called it a good goal. So you'll take it."

Kapanen got Toronto's second goal less than two minutes later, scoring on a wrist shot off assists from Andreas Johnsson and Morgan Rielly. Kapanen was also credited with an assist on Matthews' goal, along with Muzzin.

Toronto failed to convert on its power play in the third after the Bruins were nabbed for having too many men on the ice.

The Bruins were 2 for 2 on power plays in Game 4, helping propel them to the win. However they couldn't take advantage of their chances in Game 5.

Boston got its first power-play opportunity with three minutes remaining in the first after Zach Hyman was called for tripping. But it missed on two shots and Jake DeBrusk was wide of the net on another attempt shortly before the end of the period.

A second one-man advantage came just 4:13 into the second after Patrick Marleau was sent to the penalty box for hooking Krejci. This time the Bruins had two good chances. First Patrice Bergeron was denied on a wrist shot. A slap shot by David Pastrnak was also handled by Andersen.

Remarkably Boston got its third power-play chance about four minutes later when Mitchell Marner sent the puck over the glass for delay of game. Once again, the Bruins couldn't convert, mishandling the puck in the offensive zone a few times. Then Torey Krug bobbled a pass, giving Matthews a breakaway. But his he missed over the net.

Krejci thought he had a goal with 7:20 left in the second with a slap shot that slipped by Andersen's shoulder. A video review showed the puck bounced off the crossbar, failing to cross the line.

Both teams played conservatively and combined for only 13 shots on goal in the opening 15 minutes.

Rask smothered three loose pucks that hung around the net as part of seven first-period stops. Andersen had six saves in the first, his best coming when he turned away a tip-in opportunity by DeBrusk off a feed from Pastrnak.

"They were better than us in the third and finished plays," Bruins coach Bruce Cassidy said. "We've to generate more."

NOTES: Sean Kuraly started at left wing for the Bruins, making his playoff debut after missing a month with a broken hand. ... With Toronto's Nazem Kadri suspended for the remainder of the first round, William Nylander played center on a line along with Patrick Marleau and Connor Brown for the first time on the road.