DENVER — Late in the second period, with his team outplaying Colorado, Edmonton coach Todd McLellan couldn't believe his Oilers were trailing 2-1.
"Jay Woodcroft and I looked at each other and said, 'How are we losing this game?'" McLellan said.
They didn't, thanks to another big game by Connor McDavid.
McDavid had his third hat trick of the season and fourth of his career, and the Oilers beat the Avalanche 4-2 on Sunday to snap a six-game losing streak.
McDavid now has 11 goals in the last nine games and two hat tricks. His first two goals tied the game, and his last one was into an empty net with 1:26 remaining.
"Obviously the team isn't finding a way to have success, but it's a credit to the guys I'm playing with," McDavid said. "It's been pretty fluid, I've been playing with a bunch of guys, and it's a credit to them."
He has five goals in two games against the Avalanche this season.
Ryan Strome also scored and Cam Talbot had 24 saves for the Oilers, who snapped Colorado's 10-game home winning streak. The Avalanche had not lost since Dec. 27 against Arizona but failed to match Pittburgh's current 11-game home winning streak.
Colorado got goals from Tyson Jost and Alexander Kerfoot, and Semyon Varlamov had 36 saves, but the Avalanche couldn't take advantage of the return of Nathan MacKinnon.
MacKinnon missed eight games with a left shoulder injury suffered in Vancouver on Jan. 30. He was second in the league in scoring when he was injured. He entered Sunday tied for 16th with 61 points.
"I felt fine," MacKinnon said logging 22 minutes, 20 seconds of ice time.
He had a chance to tie it late, but his shot with less than four minutes left hit the post. Moments later, McDavid sealed it with his team-leading 26th goal.
The Avalanche played most of the third period down two defencemen. Anton Lindholm left late in the second period after crashing into the boards, and Erik Johnson left early in the third with an undisclosed injury.
"The couple injuries in the back end could hurt us more than just the loss today," coach Jared Bednar said.
Bednar didn't specify the injuries, but he was upset at the way his team played after being outshot 15-6 in the third.
"There's no excuse for the third," he said. "We played 14 minutes and had three shots on goal in a game we're trying to win and need to win at home. No excuse for that."
The Avalanche took one-goal leads when Jost scored 4:04 into the game and Kerfoot got his 15th with just under seven minutes left in the second period.
Strome nearly tied it at 8:01 of the third but Varlamov slid over to get a pad on his shot. He banged his stick on the floor of the bench in frustration after that but then gave Edmonton its first lead with his first goal in 22 games with 6:42 remaining.
"It's not for lack of chances, lack of effort or lack of caring. That's the frustrating part," said Strome, whose last goal came Dec. 23 against Montreal. "You come to the rink every day and you try to get better and try to do the right things, and when things aren't going in it's kind of frustrating. Nice to get that one."
NOTES: Colorado is 24-2-2 when leading after two periods. ... Edmonton's Leon Draisaitl had two assists. ... The Avalanche recalled G Andrew Hammond from Belleville of the AHL to serve as Varlamov's backup. Jonathan Bernier was injured in Friday's game at Winnipeg. ... Edmonton G Al Montoya was scratched for the second straight game after taking a puck to the mask in practice Friday. Laurent Brossoit was recalled and served as Talbot's backup for the second straight game. ... The Avalanche assigned F A.J. Greer to San Antonio to make room for MacKinnon. ... Edmonton is 3 for 34 on the power play over the last 16 games.
Oilers: Host the Boston Bruins on Tuesday night.
Avalanche: Visit the Vancouver Canucks on Tuesday night.
More NHL hockey: https://apnews.com/tag/NHLhockey