BOSTON -- Travis Sanheim scored a power-play goal 2:56 into overtime to give the Philadelphia Flyers their season-high sixth straight win, 3-2 against the Boston Bruins at TD Garden on Thursday.
There was one second remaining in Brad Marchand's tripping penalty when Sanheim scored with a wrist shot from the top of the left face-off circle.
[WATCH: All Flyers vs. Bruins highlights]
"[Wayne Simmonds] did a great job screening in front, so I just tried to pick a corner," said Sanheim, who had an assist and played his 100th NHL game.
Oskar Lindblom tied the game 2-2 for Philadelphia with a power-play goal at 10:36 of the third period. He redirected Jakub Voracek's pass through a Simmonds screen.
Video: EA Sports Overtime Winner: Sanheim wins it for Flyers
Claude Giroux scored, Voracek had two assists, and Carter Hart made 23 saves to extend his personal winning streak to five games for the Flyers (22-23-6), who came back from down a goal twice to extend the longest active winning streak in the NHL.
"I can't say enough about the way the guys played tonight. That has to be the best game we played," Philadelphia coach Scott Gordon said. "A little bit of a slow start, but you know, nothing that we couldn't recover from."
David Pastrnak scored two goals, and Tuukka Rask made 38 saves for the Bruins (27-17-7), who have lost three games in row (0-1-2) and five of six (1-2-3). They have scored 12 goals in their past five losses, but coach Bruce Cassidy said he was "disappointed" in their performance on defense against the Flyers.
"We got to fix it. Guys got to decide if they're going to play the right way and buy in and understand what we are right now," he said. "If we were scoring five goals a night, it'd be a little different animal, you can overlook some of those things. We're not in that position right now. Hopefully, we are at some point, but we're not there now."
It was Rask's first start since sustaining a concussion Jan. 19 in a 3-2 loss to the New York Rangers.
Pastrnak gave the Bruins a 1-0 lead with a power-play goal at 3:05 of the first period. Torey Krug made a cross-ice pass, and Pastrnak scored with a one-timer from the bottom of the left circle.
Video: PHI@BOS: Giroux beats Rask on breakaway
Voracek sprung Giroux for a breakaway goal that tied it 1-1 with 44 seconds left in the first. After Bruins defenseman Charlie McAvoy's shot went wide and off the end glass, Voracek retrieved the rebound at the Flyers blue line and made a quick pass ahead to Giroux.
Boston went back ahead 2-1 when Pastrnak scored his 30th goal at 5:11 of the second period on the rebound of his own tip of a Patrice Bergeron shot.
Philadelphia forward Scott Laughton was awarded a penalty shot at 6:42 of the third period when John Moore hooked him from behind on a breakaway, but Rask made a blocker save.
The Flyers are 2-20-3 when trailing after the second period.
"We came out flat a little bit, but we stuck with the game plan and the guys battled tonight," Giroux said. "These kind of wins feel a little better."
Video: PHI@BOS: Pastrnak deflects shot for second goal
They said it
"I haven't scored in a month and a half. I don't know. [Bruins goalie Tuukka Rask is] pretty patient and ... to be honest, I don't know." -- Flyers forward Scott Laughton on his failed penalty shot
"I felt good yesterday, been feeling good for a few days, so I think it's good to get back in the groove. I don't think it does any good to practice and practice and practice. Good to get a game in and go from here." -- Bruins goalie Tuukka Rask on returning after missing one game because of a concussion sustained Jan. 19
Video: PHI@BOS: Rask stands strong to shut down Konecny
Need to know
The Flyers are 2-6 in games that end in overtime, and the Bruins are 4-6. ... Philadelphia had not won six straight games since Feb. 16-26, 2018. ... Hart (20 years, 172 days) is the 10th goalie in NHL history with a personal winning streak of five or more games before turning 21 years old, first since Carey Price went 7-0-0 for the Montreal Canadiens from March 20-April 5, 2008. ... Rask remains tied with Tiny Thompson for most wins by a Bruins goalie (252). ... It was the 900th NHL game for Boston forward David Backes and the 200th for Bruins defenseman Brandon Carlo.
Flyers: Host the Edmonton Oilers on Saturday (1 p.m. ET; NHLN, SN, NBCSP, NHL.TV)
Bruins: At the Washington Capitals on Sunday (12:30 p.m. ET; NBC)
Video: Sanheim nets OT winner for Flyers' sixth straight win