Connor McDavid had his third hat trick of the season, and the Edmonton Oilers beat the Colorado 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 at 18:34 of the third.

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 got goals from Tyson Jost and Alexander Kerfoot, and Semyon Varlamov had 36 saves, but Colorado 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.

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 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, who was denied on a great chance earlier in the third, gave Edmonton its first lead with his first goal in 22 games with 6:42 remaining.