BOSTON — Jake DeBrusk scored his second goal of the game on a great individual effort in the third period as the Boston Bruins stormed back to defeat the Toronto Maple Leafs 7-4 on Wednesday in Game 7 to advance to the second round of the Stanley Cup playoffs.

Boston, which led the series 3-1 before Toronto mounted a comeback to push the series to its limit, will take on the Tampa Bay Lightning in the Eastern Conference semifinal.

Game 1 of that series goes Saturday in Tampa, Fla.

Patrice Bergeron, with a goal and two assists, David Pastrnak, Danton Heinen, Torey Krug and Brad Marchand also scored for the Bruins. David Krejci had three assists, while Kevan Miller added two of his own.

Tuukka Rask made 20 stops. Pastrnak and Marchand had an assist each for a two-point night.

Patrick Marleau, with two, Travis Dermott and Kasperi Kapanen replied for the Leafs. Frederik Andersen stopped 29 of 35 shots, with Marchand's goal going into an empty net. William Nylander added two assists.

Toronto forced Game 7 after falling behind 3-1 in the series with a 4-3 victory in Game 5 where Andersen stood on his head with a 42-save performance at TD Garden before picking up 3-1 win on home ice in Game 6.

The Leafs also trailed the Bruins 3-1 the last time the clubs met in the playoffs in 2013 before coming back to tie the series. Toronto then earned the dubious distinction of becoming the first team in NHL history to blow a three-goal lead in the third period of a Game 7 as Boston stormed back from a 4-1 deficit before winning 5-4 in overtime.

The collapse wasn't quite as bad on this night, but it hurt just the same.

The visitors led 4-3 through two periods only to see Boston tie it 70 seconds into the third when Krug blasted a shot from the point past Andersen with the teams playing 4 on 4.

The Bruins then pulled in front at 5:25 with both teams again playing down a man when he cut around Jake Gardiner off the rush and slipped a shot through Andersen's five-hole at an electric TD Garden.

Pastrnak then put it away with 8:21 to play when he beat Andersen after Marchand won a battle behind the Toronto net. Marchand added his goal with 51 seconds left in the third.

Down 3-2 following a wild first period where they led twice, the Leafs tied things at 2:07 of the second when Dermott ripped a shot past Rask for the rookie's first playoff goal.

The Bruins then went on the power play, with Andersen robbing Krug on a spectacular save from the slot to set up Kapanen shorthanded. The rookie winger, who failed to connect on a number of chances earlier in the series, fought off Marchand before moving in alone on Rask and beating the Bruins netminder with a slick forehand-backhand move at 6:05.

Marleau opened the scoring on the power play at 2:05 of the first when he tipped Gardiner's point shot past Rask, but DeBrusk tied it on a Boston man advantage just 2:42 later when he redirected Pasternak's effort from the high slot.

Marleau restored Toronto's lead at 6:12 by roofing one on Rask, who allowed four goals on 13 shots in Game 5 before getting pulled, off a great pass from Mitch Marner.

But the Bruins came back once again when Heinen corralled a loose puck in front a beat Andersen at 9:10 to cap stretch of four goals on 11 combined shots.

The Leafs lost Morgan Rielly later in the period after he took a Zdeno Chara shot from the point in the mouth while battling in front. The bleeding Toronto defenceman missed the rest of the period, but returned for the second.

Marner and Auston Matthews had a couple of chances to restore the Leafs' lead in the frenetic opening 20 minutes, but the Bruins when ahead with 36.4 seconds left when Miller shot intentionally wide right to Bergeron, who buried his first point since Game 2.

Note: The Leafs last won a playoff series in 2004 when they beat the Ottawa Senators in seven games before falling to Philadelphia Flyers 4-2 in the conference semifinal. ... There was a moment of silence before the opening faceoff to honour the 10 people killed in Toronto on Monday when a van mounted a sidewalk and struck multiple pedestrians.