GLENDALE, Ariz. — The Buffalo Sabres have struggled at times this season when they had the lead, often fumbling it away.

Against Phoenix, a team fighting for a playoff spot, they seemed to get better while out front, leaving the Coyotes steaming mad.

Zemgus Girgensons scored a short-handed goal in the third period and had an assist, and the road-weary Sabres knocked off the Coyotes 3-2 on Thursday night.

"Sometimes when we have a lead, we panic a little bit," Sabres coach Ted Nolan said. "Tonight, we still panicked a bit, but not as much and it was good to see."

The Sabres had plenty of energy in their third game in four nights, scoring the first goal and rallying from a 2-1 deficit in the third period. Tyler Ennis and Steve Ott scored, and Girgensons put Buffalo ahead with his goal early in the third.

Ryan Miller kept the Sabres in it with a stellar first period and made some tough stops after giving up two quick goals in the second, finishing with 38 saves in Buffalo's second win in 10 games.

"He's done a tremendous job for us," Girgensons said.

Phoenix followed one of its best games of the season with a shaky performance.

The Coyotes dominated most of the first period, only to give up the first goal, and then blew a 2-1 lead by repeatedly turning the puck over in the second period. They tried to rally with a late push, but came up short in what they had deemed a must-win game.

Antoine Vermette scored his fifth goal in three games to extend his point streak to six games, and David Moss scored his first goal in 17 games for the Coyotes.

"We're up 2-1 at the start of the second and do absolutely nothing — NOTHING as a group," said red-faced Coyotes captain Shane Doan. "We had a chance to put a team away when you're up 2-1 at home, I don't think we got a shot for 12 minutes, it's embarrassing. It's embarrassing."

Phoenix played perhaps its best game at a critical juncture of the season on Tuesday, kicking off a five-game homestand with a 3-0 victory over the Los Angeles Kings behind Thomas Greiss' second shutout in three starts.

Coming off a game like that, the Coyotes needed to avoid a slipup against the NHL's worst team.

The Sabres began the day with an NHL-low 14 wins and 36 points — six fewer than anyone else — and had allowed 31 goals while losing eight of nine. Buffalo also came in as the NHL's lowest-scoring team with 101 goals, which was 23 fewer than the next closest team.

The Coyotes had added incentive after losing to Buffalo in overtime on Dec. 23, when a shot by defenseman Mark Pysyk caromed into the pants of Phoenix goalie Mike Smith, who fell back into the net for the deciding goal.

Despite being outshot 21-12 in the first period, the Sabres scored first by getting traffic in front of Greiss, leading to Ennis' 12th goal of the season on a rebound.

The Coyotes quickly snapped out of their funk.

Vermette scored his team-leading 20th goal of the season on a power play, one-timing a rebound past Miller. Moss scored 18 seconds later, swiping in a backhander on another rebound.

But Buffalo fought right back.

Ott tied it in the second period on a power play, punching a rebound under Greiss' arm as he dove, the first allowed by Phoenix after 14 straight penalty kills.

Girgensons put the Sabres up early in the third period with the Coyotes on the power play, poking the puck away from Coyotes defenseman Keith Yandle and past Greiss in the same motion.

Buffalo held on behind some big saves by Miller in the closing minutes, sweeping the season series over Phoenix.

"They were playing with a lot of juice and when you keep turning the puck over, it makes it hard on you," Coyotes coach Dave Tippett said. "It made it hard on us and we kept turning the puck over until they won the game."