Buffalo, NY (SportsNetwork.com) - Sam Gagner scored 56 seconds into overtime to lift the Arizona Coyotes to a 4-3 win over the Buffalo Sabres on Thursday night in a game between the NHL's two worst teams.

With Sabres defenseman Mike Weber off on a tripping penalty he took with 30 seconds left in regulation, the Coyotes wasted little time winning the game on Gagner's slap shot from the left circle, which beat Buffalo goaltender Matt Hackett to the short side.

It came after Brian Gionta's power-play goal tied the score for Buffalo with 3:37 remaining in regulation.

Jordan Szwarz, Oliver Ekman-Larsson and David Moss also scored and Mike Smith had 32 saves for Arizona, the Western Conference's last-place team.

The Coyotes got their second win in a row for the first time in more than a month and won for only the third time in their last 21 games (3-17-1). They have 54 points, six more than the NHL-worst Sabres, who dwell in the Eastern Conference basement.

"We came in with the mindset of trying to get our first two-game winning streak in a long time," said Coyotes coach Dave Tippett. "I thought we played hard."

Tyler Ennis and Rasmus Ristolainen had the other two goals for Buffalo, which has dropped four in a row and 11 of its last 12 (1-8-3). Hackett was shaken up by a collision in the third period but remained in the game and finished with 38 saves.

Gagner's game-winner drew cheers from the home crowd, the fans presumably rooting for the Sabres to continue losing so they will end up with the No. 1 overall draft pick.

Buffalo coach Ted Nolan said he didn't hear it.

"I'm never going to complain about the fans in this city," he said. "We get 19,000 on a regular basis. I didn't hear what happened at the end. I was just focused on the game."

But Weber heard the cheers and called it "extremely frustrating" and "a whole new low."

"I've always spoken extremely high of the fans," Weber said. "I don't even know if disappointed is the word. ... They scored (the first goal) and our fans are cheering. Late penalty, they cheer. They cheer when they score to win the game. ...

"We don't want to be here. We understand where we are. We understand what this team's doing, what the organization's doing, the place we put ourselves in, but I've never been a part of something like that where the away team comes into a home building and (our fans are) cheering for them."

Ekman-Larsson and Moss pulled the Coyotes out of a 2-1 hole with goals 2:51 apart in the second period, with Moss' deflection making it 3-2 at 14:20.

The Arizona lead lasted until Gionta's goal on a slap shot, which came after consecutive giveaways in the Coyotes zone.

Szwarz, playing in his second game of the season, picked up his first point and gave the Coyotes a 1-0 after 7:55 with a snap shot from the left circle that beat Hackett to the far side top corner.

Ennis tied the score for Buffalo at 10:49 of the period with his 19th goal of the season, fooling Smith with a deke in front of the net after taking a pass from Matt Moulson on an odd-man rush.

Ristolainen gave the Sabres a 2-1 lead 8:37 into the second period on a power play with a slap shot that made it through Moss' screen in front of Smith.

Game Notes

Ennis left the game with an upper-body injury ... The teams will meet again on Monday in Arizona ... Arizona will end its three-game road trip on Saturday in Pittsburgh ... Buffalo goes on the road to play Colorado on Saturday.