BOSTON -- Drew Stafford scored with 5.6 seconds remaining in the third period to give the Boston Bruins a 2-1 win against the Philadelphia Flyers at TD Garden on Saturday.
Stafford pulled up in the right circle and took a wrist shot that deflected off the stick of Flyers defenseman Brandon Manning and past goaltender Steve Mason.
David Pastrnak scored, and Tuukka Rask made 26 saves for the Bruins (36-26-6), who won their second straight game and are 10-3-0 under coach Bruce Cassidy. The Bruins were outshot 9-4 in the second period but outshot the Flyers 12-4 in the third.
WATCH: All Flyers vs. Bruins highlights
"We knew we didn't have a great second period, so we made a couple adjustments on our breakout," Cassidy said. "I thought they were doing a real good job on the forecheck, putting us in bad spots in the second period, and we got hemmed in our end. As a result, we had no flow in that period. So that was one thing.
"The message mostly was sometimes you've got to win 5-4 and sometimes it's 2-1. And it was shaping up to be a 2-1 game, so let's accept it, manage the puck, play tight, and if we get an opportunity let's make sure we bear down. And we did have some because we were cleaner in our end and we managed the puck better."
The Bruins are two points ahead of the Toronto Maple Leafs for third place in the Atlantic Division.
Jordan Weal scored, and Mason made 25 saves for the Flyers (31-28-8), who have lost two in a row and three of their past four (1-2-1). They trail the New York Islanders by five points for the second wild card into the Stanley Cup Playoffs from the Eastern Conference.
Video: PHI@BOS: Rask gets across to stone Couturier
"We worked pretty hard today," Flyers coach Dave Hakstol said. "You know, the effort of our hockey team, on the road here was excellent. You look at the goal that wasn't allowed, some other plays, are those bounces or breaks? Hey, that's just part of hockey. Our team played real hard today."
Flyers forward Brayden Schenn thought he scored at 9:01 of the first period, but after video review it was ruled the referee intended to blow the whistle when Rask made a save up against the post on Jakub Voracek's shot.
Pastrnak scored his 28th of the season at 18:38 of the first period to give Boston a 1-0 lead. Weal tied it 1-1 near the crease 1:27 into the second period. The Bruins used a coach's challenge to say the Flyers were offsides prior to the goal, but the call on the ice was upheld.
Video: PHI@BOS: Weal nets Simmonds' pass on the doorstep
Goal of the game
Defenseman Kevan Miller hit Stafford in stride with a pass at the Boston blue line. Stafford carried the puck into the Philadelphia zone before scoring his sixth goal of the season, his second in four games since the Bruins acquired him in a trade with the Winnipeg Jets on March 1.
Video: PHI@BOS: Stafford's shot deflects in for late lead
Save of the game
Rask gloved Ivan Provorov's wrist shot from the high slot at 13:25 of the third period to keep it 1-1.
Highlight of the game
Patrice Bergeron hit Pastrnak with a pass below the right hash mark for a one-timer that beat Mason.
Video: PHI@BOS: Pastrnak buries one-timer to open scoring
Unsung performance of the game
Bruins forward Brad Marchand didn't get an assist on Pastrnak's goal but made the play happen with a hit on Flyers defenseman Andrew MacDonald to knock the puck loose behind the goal line.
They said it
"I think [Rask] making the saves that he did and ... you've got to give something up at times, and him being able to make the saves that he did allowed [us] to be in the lanes that we were to block shots and have our sticks in certain areas and stuff. I think it was a great job by him making the saves when we needed them." -- Bruins defenseman Adam McQuaid on killing a 1:43, 5-on-3 power play in the first period
"Even when you're not playing your best, you find a way to win -- whether it's a lucky bounce like that -- it's 99 out of 100 times, it's not going to go in. So those kinds of breaks, you'll take those, especially when things might not be going your way a certain night." -- Bruins forward Drew Stafford on his goal
Need to know
Bruins center Ryan Spooner missed his second straight game with a concussion. He will travel on the trip to Western Canada. ... Pastrnak has an NHL career high eight-game point streak (three goals, seven assists). ... Provorov played an NHL career high 25:18 and had five hits.
Flyers: Host the Columbus Blue Jackets on Monday (7 p.m. ET; SN1, SNE, SNO, CSN-PH, FS-O, NHL.TV)
Bruins: At the Vancouver Canucks on Monday (10 p.m. ET; SNP, NESN, NHL.TV)
Video: Stafford's late goal lifts Bruins past Flyers, 2-1