Buffalo Sabres\' Daniel Briere, not pictured, scores on Ottawa Senators goalie Ray Emery during the first period of the NHL hockey game at HSBC Arena in Buffalo, N.Y., Wednesday. (AP/David Duprey)
Chris Neil, Jason Spezza and Chris Phillips also scored for the Senators, who snapped a two-game losing streak and won for only the second time in nine games.
Daniel Briere and Thomas Vanek scored for the Sabres, who had their four-game winning streak snapped. Buffalo (15-2-1) lost for only the second time in regulation.
Schaefer deflected Daniel Alfredsson's wrist shot from the right point past goalie Martin Biron with 7:11 left in the third to give the Senators a 3-2 lead. The goal was upheld after a replay review showed he didn't strike the puck with a high stick.
Ottawa's Ray Emery made 27 saves in his first start since a loss to Montreal on Oct. 31. He had been hampered by a sprained left wrist sustained eight days earlier in practice.
Phillips sealed the win with a short-handed, empty-netter that was shot from behind his goal line.
Briere gave Buffalo a 1-0 lead 5 1/2 minutes in after he corralled Ottawa defenceman Andrej Meszaros' errant clearing pass at the Senators blue line. Briere took two strides and let go a slap shot from the top of the right circle that beat Emery.
The Senators tied it four minutes later on the power play when Neil's wrist shot from the bottom of the left circle got by Biron.
Vanek made it 2-1 with his team-leading 12th goal, converting a rebound after Emery stopped Drew Stafford's wrist shot from the right circle.
Spezza tied it at 2 with a power-play goal at 6:32 of the third, deflecting Meszaros' slap shot from the left point.
Biron made 19 saves and lost for the first time in five starts. He foiled breakaway attempts by Alfredsson and Antoine Vermette in the first period, and was helped in the second when Ottawa defenceman Anton Volchenkov's slap shot ricocheted off two Buffalo players before hitting the right post.
Notes: The Sabres will play six of eight at home. ... These teams will meet again in Ottawa on Saturday night. ... Sabres G Ryan Miller skated lightly Wednesday morning. He has missed four games because of an abdominal strain. ... Buffalo D Toni Lydman sat out for the third time with a neck strain. ... Ottawa is 1-7 when falling behind 1-0.