PHILADELPHIA -- Tyson Foerster scored two goals in the final minute of the second period for the Philadelphia Flyers in a 4-2 win against the Ottawa Senators at Wells Fargo Center on Saturday.

Foerster has six goals in five games since returning from an injury to his right foot that caused him to miss four. 

"He's come back pretty seamlessly," Flyers forward Scott Laughton said. "He's been great for us. He's been good all year defensively, and now he's starting to score some goals, which are crucial for our team."

Joel Farabee and Cam York scored for Philadelphia (32-23-7). Felix Sandstrom, who was recalled from Lehigh Valley of the American Hockey League on Thursday, made 24 saves in his season debut.

The win came one day after the Flyers blew a 2-0 lead in a 5-2 loss to the Washington Capitals on Friday.

"You don't have to direct the group too much," Philadelphia coach John Tortorella said. "They've assessed themselves pretty well this year. I had full confidence coming into tonight's game that they were going to answer the proper way."

Vladimir Tarasenko and Thomas Chabot scored for Ottawa (25-31-3), which lost its fourth straight game. Mads Sogaard made 36 saves.

"We made some mistakes and they found the back of the net," Chabot said. "Once again we battled back, we give ourselves a chance. We hit a lot of posts there late in the third. One of those goes in we've got a tie game, or you never know what happens."

Foerster put the Flyers ahead 2-1 at 19:13 of the second period. After Laughton won a face-off in the Senators' zone, Foerster was the first to the loose puck and beat Sogaard with a wrist shot from above the left circle.

Foerster then scored on a penalty shot at 19:58 to make it 3-1, beating Sogaard five-hole with a wrist shot after he was slashed by Senators forward Shane Pinto on a breakaway. It was the Flyers' fifth goal via a penalty shot this season, an NHL record.

"I thought we had a good second period, but one minute left we gave them two goals," Senators coach Jacques Martin said. "Those were gifts. Off the face-off we miss an assignment, and then a turnover at the offensive blue line with 12 seconds left and it cost us the game."

Foerster has nine goals in his past nine games after scoring seven in his first 48.

"You've just got to keep playing," he said. "I had a bunch of chances early on in the year and they weren't going in. Now they're starting to."

Despite the early offensive struggles, Tortorella found Foerster a dependable player because of his play away from the puck.

Foerster tipped a pass by Senators defenseman Jakob Chychrun at the Flyers' blue line, which led to him drawing the penalty shot.

"It's easy for a coach to look at a guy for scoring but also know he's probably one of your best defensive players, too," Tortorella said. "So, I've been looking his way pretty much all year long."

Chabot cut it to 3-2 at 18:02 of the third period with a one-timer from the bottom of the right circle with Sogaard pulled for an extra attacker.

However, York scored an empty-net goal at 19:59 for the 4-2 final.

Farabee gave the Flyers a 1-0 lead at 1:08 of the first period when he redirected Nick Seeler's shot from the left point past Sogaard. It was Farabee's first goal in 15 games.

Tarasenko tied it 1-1 at 4:04 of the second period, keeping the puck on a 2-on-1 rush and scoring with a backhand from the right circle.

NOTES: Martin did not have an update on Senators captain Brady Tkachuk, who missed the game because of an upper-body injury he sustained during the third period of a 5-3 loss to the Arizona Coyotes on Friday. "He didn't feel good in the afternoon, so that's why he didn't play," Martin said. ... Senators forward Zack MacEwen missed the final two periods because of a lower-body injury. Martin said MacEwen will return to Ottawa for evaluation. He did not have an update on goalie Anton Forsberg, who sustained a lower-body injury Friday. ... Ottawa forward Claude Giroux had an assist on Chabot's goal and has nine points (three goals, six assists) in a six-game point streak against Philadelphia. Giroux played his first 15 NHL seasons with the Flyers. ... Sandstrom played his first NHL game since April 13, 2023.