"The Flyers have a lot of guys who are real good agitators," Connolly said. "I think if you can stay out of the penalty box and just play physical with them, you have a good chance to win."
Connolly lifted a wrist shot from the slot high over Philadelphia goaltender Ray Emery to break a 2-2 tie at 5:27 in the final period. He scored again at 10:18 when his shot bounced off Emery's mask.
"Their fourth goal was a bit lucky," Richards said. "But I thought we had some [scoring] chances. We just didn't capitalize like they did."
Ryan Miller, who went into the game leading the NHL with a 1.98 goals-against average, made 31 saves, including a brilliant stop on a shot by Jeff Carter late in the second period.
Emery, who lost his third straight start, had 21 saves.
"We just feel a little empty right now," Philadelphia's Scott Hartnell said. "We were riding high after that late win on Long Island [2-1 on Wednesday] but they [the Sabres] were fired up to come in here and play."
Stafford was credited with Buffalo's first goal at 8:19 of the first period when Philadelphia defenseman Matt Carle inadvertently knocked his backhand into the net.
"We definitely needed this one," Stafford said. "It was a very emotional game, a very physical game. It was pretty much a war out there but we were able to pull through and get back on track."
The Flyers scored twice within 30 seconds to take a 2-1 lead late in the period.
Richards went forehand to backhand to score at 19:26, and then Coburn's shot deflected off Connolly with 3.6 seconds left.
Gaustad pulled the Sabres even on a power play at 6:09 of the second period when he redirected Connolly's shot from the point.
"We stumbled at the end of the first period but for the next 40 minutes we battled good enough to win the game," Buffalo coach Lindy Ruff said. "We're desperate. The number of games we've lost on the road you've got to show that desperation."
Buffalo's Craig Rivet and Philadelphia's Dan Carcillo went at each other twice within a nine-minute span in the second period and received five-minute fighting majors both times. Carcillo was given a 10-minute misconduct penalty after the second fight. Rivet was helped off the ice with 3:22 left in the third period after being hit by Philadelphia's Arron Asham.
The Flyers' Danny Briere served the second of a two-game suspension for a late hit on Colorado's Scott Hannan on Monday. ... Buffalo right winger Patrick Kaleta received a five-minute major penalty and a game misconduct for boarding Philadelphia center Jared Ross midway through the first period. Ross did not return. ... Philadelphia right winger Ian Laperriere was hit in the face by a slap shot by Buffalo right winger Jason Pominville late in the first period but returned in the third.
Copyright by STATS LLC and The Associated Press
PHILADELPHIA - NOVEMBER 27: Goaltender Ryan Miller #30 of the Buffalo Sabres reflects before warmups prior to his...