Trailing by a goal through two periods, the Bruins scored four times in the third to eliminate the Leafs, 7-4, and advance to a second-round series against the Lightning.

BOSTON -- You’d never have known Jake DeBrusk was in unfamiliar territory.

The 21-year-old winger has never been in an NHL playoff series before this month. He had never played in an NHL Game 7 until Wednesday night. And he hardly ever gets to play in 4-on-4 manpower situations, an assignment he was given in Wednesday night’s third period.

DeBrusk responded like a veteran, and the Bruins are advancing to the second round of the playoffs largely because of that. DeBrusk’s second goal of the night, a dazzling, dangerous drive to the net early in the third period, snapped a 4-4 tie and sent the B’s to a 7-4 decision over the Maple Leafs in Game 7 of their first-round playoff series at TD Garden.

The Bruins open a best-of-7 series against the Eastern Conference top seed, the Lightning, at 3 p.m. on Saturday at Tampa.

Trailing 4-3 after two periods and on the verge of blowing the 3-1 lead they’d had in the series, the B’s overwhelmed the Leafs with four goals in the third period. DeBrusk’s fifth of the series, which made it a 5-4 game with 14:35 left in game, came on a high-speed, 4-on-4 rush on which he cut to the net from the right circle and shot an instant before Leafs defenseman Jake Gardiner leveled him.

“I didn’t even see it go in,” said DeBrusk, who scored the Bruins’ first goal of the night on a first-period power play. “I just heard the crowd go pretty nuts.

“It was a very special feeling, making it 5-4 at that point. I knew that as soon as we got the lead, we were going to be fine.”

The Bruins had barely been able to stay even, let alone get a lead before DeBrusk’s winner, which came off linemate David Krejci’s third assist of the game. The Leafs had first-period leads of 1-0 and 2-1, both courtesy of veteran winger Patrick Marleau. DeBrusk (1-1) and fellow rookie Danton Heinen (2-2), the latter with his first career playoff goal, answered both Marleau goals, and Patrice Bergeron’s first goal of the series finally put the Bruins ahead, 3-2, less than a minute before the first intermission.

They couldn’t maintain that lead, though.

The line of Bergeron and wingers Brad Marchand and David Pastrnak, which had broken a three-game scoreless streak at even strength on Bergeron’s go-ahead goal, couldn’t clear the defensive zone early in the second, which led to a goal for Travis Dermott after just 2:07. A shorthanded goal by Kasperi Kapanen, who won a fierce battle with Marchand for puck control in the neutral zone and beat Tuukka Rask (20 saves) on a breakaway, stunned the Garden at 6:05, giving the Leafs a 4-3 lead they’d take into the third period.

“We needed something good to happen,” Bruins coach Bruce Cassidy said. “I don’t think we were necessarily on our heels, but the second period didn’t go our way.”

Enter DeBrusk -- after defenseman Torey Krug opened the floodgates. With the teams at four skaters per side, Krug rocketed a shot through traffic after Bergeron won a faceoff to make it 4-4 just 1:10 into the third period.

Then, Krug and the rest of the team marveled at DeBrusk’s winner.

“There’s something inside of him that not many guys have,” Krug said of the rookie. “When he wants it, he’s going to get it.”

The Bruins closed the third well, allowing only eight shots to get through to Rask, who survived another difficult night that saw him surrender four goals on the Leafs’ first 14 shots. All told, Rask faced only 24 shots while Frederik Andersen was pelted by 36 in the Leafs’ net.

“That was one of the most incredible games I’ve ever been part of,” said Marchand, who set up Pastrnak for a big insurance goal with 8:21 left in regulation, and closed the scoring with a last-minute, empty-net goal. “We just figured it was a matter of time, and luckily, it went our way.”