Updated

Jamie McGinn forced overtime by scoring with 2 seconds left in regulation, and Peter Mueller netted the lone shootout goal in the Colorado Avalanche's 5-4 win over the Buffalo Sabres on Wednesday night.

McGinn scored twice, Gabriel Landeskog had a goal and assist, and David Jones scored for the Avalanche (38-30-4), who vaulted out of a four-way tie for eighth place in the Western Conference to sixth. Semyon Varlamov made 20 saves through overtime, and stopped all three of Buffalo's shootout attempts to improve to 8-0 in the tiebreaker.

Rookie Marcus Foligno scored twice for Buffalo (33-29-9), which inched within three points of eighth-place Washington in the East. Drew Stafford had a goal and two assists, Tyler Ennis had three assists, and Alexander Sulzer also scored for the Sabres.

Mueller's decisive shootout goal came on the Avalanche's second attempt. He snapped a shot that beat Ryan Miller on the glove side. Miller finished with 38 saves. Varlamov secured the victory by stopping Ennis' drive to the net.

The Avalanche are 9-1 in shootouts this season.

McGinn forced overtime during a wild scramble in front. Landeskog gained the zone and got a shot off, that Miller stopped with his blocker. The puck eventually went to the right corner, where Ryan O'Reilly took a bad-angle shot that sneaked between Miller's pad and the post. The puck trickled into the crease, and McGinn swept it in.

It was reminiscent of the Sabres' 3-2 overtime win over Montreal on Monday, in which Buffalo allowed the Canadiens to tie it with 5 seconds remaining.

The loss spoiled a big night for Foligno, who scored twice with his father — former Sabres captain Mike Foligno — in the stands.

Fans initially thought he had scored a third goal, and littered the ice with hats in the third period. But the goal was credited to Sulzer, as replays showed the puck went off the stick of Colorado defenseman Matt Hunwick, and not Foligno.

Foligno gave the crowd a big reason to cheer when he scored his first of the game 1:39 in. He slipped in front, while attempting to handle Ennis' centering pass, and the puck caromed off his skate and Jones' skate.

Upon scoring, Foligno jumped up and down once, mimicking his father's goal celebration.

It was a back-and-forth game with the Sabres squandering two one-goal leads in the first period. Jones converted a rebound in front to tie it at 2 with 52 seconds left.

Landeskog put the Avalanche ahead with a power-play goal 5:35 into the second period.

Foligno tied it 11 minutes into the second period, sending in a shot from the top of the left circle past Varlamov, who was screened by Ennis.

NOTES: Sabres D Tyler Myers began serving a three-game NHL suspension for a hit against Montreal on Monday. With Andrej Sekera (pneumonia) missing his fifth game, the Sabres recalled rookie Brayden McNabb from AHL Rochester. McNabb had a goal and four assists in 20 games with Buffalo earlier this season. ... The Avalanche opened a three-game road trip, and in the midst of a 16 games in 30-day stretch. ... Sabres C Nathan Gerbe didn't play due to an undisclosed upper body injury. Cody McCormick took his spot, returning to the lineup after missing 16 games with a concussion. ... With speculation that NFL free agent DE Mario Williams was in attendance, fans chanted "We want Mario!" Williams has spent two days negotiating with the Bills.