OTTAWA, Ontario (AP) -- Robin Lehner made 39 saves against his former team and Matt Moulson and Justin Bailey scored in the third period to rally the Buffalo Sabres past the Ottawa Senators 3-2 on Tuesday night.
Lehner is 4-0-2 against the club that drafted him in the second round of the 2009 NHL draft. He was traded away with David Legwand in June 2015 to Buffalo for the 21st overall pick in that year's draft.
Ryan O'Reilly also scored for the Sabres.
Bobby Ryan ended a five-game run without a point by getting a goal and an assist for Ottawa. Dion Phaneuf also scored, and Craig Anderson made 22 saves.
After a solid start to the third period, Buffalo kept pushing and was rewarded when Bailey tipped Jake McCabe's point shot to take a 3-2 lead at 7:38.
The Sabres tied it 51 seconds into the third when Moulson picked up a puck at the side of the net and put it over Anderson's back.
Coming into the game, Buffalo had given up 62 second-period goals, third worst in the league. Tuesday night was no different as the Sabres were outshot 16-7.
Ottawa made it 63 when Phaneuf jumped on a soft rebound and put the puck past Lehner to give the Senators a 2-1 lead.
The Sabres opened the scoring on their first shot when O'Reilly used Phaneuf as a screen and beat Anderson low glove side. The Senators tied it at the 14-minute mark of the period when Ryan tipped Erik Karlsson's shot from the point.
This was the fifth and final meeting between the two teams, with Buffalo going 4-0-1.
NOTES: Ottawa wrapped its four-game homestand 2-2-0. ... Senators D Chris Wideman was a late scratch due to a lower-body injury, and RW Curtis Lazar was a healthy scratch for the fourth straight game. ... Buffalo D Zach Bogosian returned to the lineup after missing the last six games with a rib injury, but LW Evander Kane did not play due to illness and D Taylor Fedun was a healthy scratch.
Sabres: Host Colorado on Thursday night to start a three-game homestand.
Senators: Travel to play New Jersey on Thursday night.