Boston Bruins right wing David Pastrnak (88) celebrates his goal past Philadelphia Flyers goaltender Carter Hart (79) as Flyers defensemen Radko Gudas (3) and Robert Hagg (8) look on in the second period of an NHL hockey game, Thursday, Jan. 31, 2019, in Boston. Credit: Elise Amendola | AP

The Philadelphia Flyers’s holiday slump is well behind them. Now they’re trying to salvage what had been a dismal season.

Travis Sanheim scored a power-play goal 2:56 into overtime and the Flyers beat the Boston Bruins 3-2 on Thursday night to extend their season-best winning streak to six.

The Flyers went 2 for 2 on the power play — improving to 14.1 percent for the season — and won in overtime for just the second time this season.

“We played one of our best games,” said captain Claude Giroux, whose breakaway goal with 44 seconds left in the first period tied it at 1-1 and jumpstarted the Flyers for the remainder of the game. “I think it’s confidence. When you get a couple wins you start feeling better about yourselves”

There was little confidence for Philadelphia at the beginning of the month during a losing streak that hit eight straight before the recent turnaround.

“I can’t say enough about the way the guys played tonight,” coach Scott Gordon said. “That has to be the best game we played. A little bit of a slow start, but you know, nothing that we couldn’t recover from.”

Sanheim had a goal and an assist, helping setting up Oskar Lindblom’s tying goal with 9:24 left in the third period, then beat Tuukka Rask with a long wrist shot in the final seconds of a power play after Brad Marchand was sent off for tripping.

Jakub Voracek had two assists and Carter Hart made 23 saves for the resurgent Flyers, who have won seven of eight to improve to 22-23-6 and took the season series against the Bruins 2-1.

[Subscribe to our free morning newsletter and get the latest headlines in your inbox]

David Pastrnak scored both goals for the Bruins. Rask, out with a concussion since Jan. 19, stopped 38 shots in his return. The Bruins lost their third straight, making costly mistakes at crucial times once again.

“We have to fix it. The guys have to decide if they’re going to play the right way and buy in and understand what we are right now,” coach Bruce Cassidy said. “If we’re scoring five goals a night, you get a little different animal. You can overlook some of those things. We’re not in that position right now.”

Travis Konecny, who drew the penalty on Marchand in OT, assisted with Sean Couturier on Sanheim’s winner from the left circle.

Pastrnak scored a power-play goal 3:05 into the game to put the Bruins up 1-0, beating Hart with a one-timer from the left circle off Torey Krug’s pass with 42 seconds remaining on Giroux’s tripping penalty.

Pastrnak reached 30 goals for the third straight season when he tipped in a shot by Bergeron 5:11 into the second, putting Boston up 2-1.

Giroux beat Rask on a breakaway with 44 seconds left in the first to tie it at 1. It was just the eighth shot of the period for the Flyers, who got their offense going in the second period and outshot the Bruins 17-7, then continued to pressure Boston in the third.

Rask stopped Scott Laughton on a penalty shot 6:22 into the third, but the Flyers tied it with 9:24 left on Lindblom’s power-play goal from the slot off a pass from Voracek.

Rask entered the game tied with Cecil “Tiny” Thompson as the winningest goaltender in club history with 252 victories. He was playing in his first game since Jan. 19, when a collision with New York Rangers’ Filip Chytil left him with a concussion in the Bruins’ final game before the All-Star break.

NOTES: Boston RW David Backes played in his 900th NHL game. … F Joakim Nordstrom returned to the Bruins lineup after missing 10 games with a leg fracture. … Philadelphia D Shayne Gostisbehere missed his third straight game with a lower-body injury. … Voracek has assists in six of seven games.


Flyers: Host Edmonton on Saturday afternoon to open a five-game homestand.

Bruins: At Washington on Sunday afternoon.