BOSTON — The Boston Bruins will have their work cut out for them if they want to keep their season alive.

In Game 5 of their first-round Stanley Cup Playoff series, the B’s fell 2-1 to the Toronto Maple Leafs at TD Garden on Friday. The Leafs now lead the best-of-seven series 3-2 with Game 6 set to take place in Toronto on Sunday.

It was level-pegging through 50 minutes, but a pair of Maple Leafs goals in the back half of the third period gave them the important victory. David Krejci scored the Bruins’ lone goal, while Auston Matthews and Kasperi Kapanen accounted for the visitors’ tallies.

Tuukka Rask made 25 saves for the Bruins, while Frederik Andersen turned away 27 shots for Toronto.

Here’s how it all went down:

There was plenty of energy in the first period, but it finished scoreless. That’s fortunate for the Bruins, because they thoroughly were outplayed.

Toronto came out with plenty of speed, while the Bruins took far longer to find their footing. The second line, comprised of Krejci, Jake DeBrusk and David Pastrnak, strung together the best shifts for the Bruins, creating a few quality chances, but couldn’t cash in.

Zach Hyman had the period’s only penalty, getting whistled for tripping Charlie McAvoy with three minutes left, but the Bruins couldn’t cash in.

Toronto outshot Boston 7-6 in the first.

The middle 20 minutes brought as many goals as the first.

Boston had no shortage of chances, as it got two opportunities on the power play. They also managed to get a few shots off in high-danger areas, most notably a Krejci attempt that rang off the post with the net wide open since Andersen was drawn to the other side.

The Leafs led in shots 16-15 through two periods.

The back half of the third period was not kind to the Bruins. They conceded a pair of goals, allowing the Maple Leafs to head home with a win.

Shortly past the midway point of the period, the Leafs got on the board. The Bruins had killed a too many men on the ice penalty a couple minutes earlier, but still found themselves under duress in their defensive zone. Jake Muzzin had a wide open shot at the point, but remained unmarked, so he skated a little deeper. Instead of firing a slap shot, the defenseman rifled a pass over to Matthews, who one-timed home the game’s first goal at 11:33.

There was a Bruins challenge for goaltender interference, but officials didn’t think Hyman impeded Rask from making the save.

A few minutes later, Toronto scored the pivotal, game-sealing goal.

After clearing their defensive zone, the Leafs crossed center ice on a 3-on-2. Morgan Rielly hit Andreas Johnsson on his left with a pass, and after carrying the puck for a moment, Johnsson slid a pass cross-ice to Kapanen, who beat Rask with a one-timer at 13:45.

The Bruins didn’t take the loss lying down though.

With the Bruins’ net empty and less than a minute left, Pastrnak skated in from the point and appeared like he was going to fire a shot. Instead, he executed a diagonal pass to Krejci, who buried Boston’s first goal with a one-timer with 43.4 seconds left in the game.

Boston kept its net empty for the final seconds of the game, but were unable to find an equalizer.

The series will return to Toronto one final time, with Game 6 set to take place Sunday. Puck drop from Scotiabank Arena is set for 3 p.m. ET.

This Bruins Wrap is presented by Plainridge Park Casino.

Thumbnail photo via John E. Sokolowski/USA TODAY Sports Images