Gabriel Landeskog scored three goals, the last of which put Colorado ahead with 3:22 remaining, and the Avalanche beat the New Jersey Devils 5-3 on Thursday night.

Landeskog one-timed Mikko Rantanen's pass from behind the net to complete his third career hat trick. He scored earlier in the third period on a deflection of a shot by Ian Cole.

More Images
Colorado Avalanche left wing Gabriel Landeskog (92), of Sweden, celebrates after scoring a goal as New Jersey Devils goaltender Keith Kinkaid (1) and defenseman Mirco Muellerr (25), of Switzerland, look on during the third period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The Avalanche won 5-3. (AP PhotoJulio Cortez)

Gabriel Landeskog scored three goals, the last of which put Colorado ahead with 3:22 remaining, and the Avalanche beat the New Jersey Devils 5-3 on Thursday night.

A shot by Colorado Avalanche left wing Gabriel Landeskog, not pictured, of Sweden, enters the net of New Jersey Devils goaltender Keith Kinkaid (1) for a goal during the third period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The Avalanche won 5-3. (AP PhotoJulio Cortez)

Rantanen scored on an empty-netter with 12 seconds left and added three assists, giving him a league-leading 11 this season.

Colorado Avalanche goaltender Philipp Grubauer, of Germany, watches as a shot by the New Jersey Devils goes by him during the second period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The shot hit the post, but it did not enter the net. (AP PhotoJulio Cortez)

Colorado Avalanche goaltender Philipp Grubauer, of Germany, watches as a shot by the New Jersey Devils goes by him during the second period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The shot hit the post, but it did not enter the net. (AP PhotoJulio Cortez)

New Jersey Devils center Travis Zajac, center, is helped off the ice by left wing Miles Wood (44) after taking a hit against the Colorado Avalanche during the second period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. (AP PhotoJulio Cortez)

New Jersey Devils center Travis Zajac, center, is helped off the ice by left wing Miles Wood (44) after taking a hit against the Colorado Avalanche during the second period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. (AP PhotoJulio Cortez)

Colorado Avalanche goaltender Philipp Grubauer, of Germany, watches as a shot by the New Jersey Devils goes by him during the second period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The shot hit the post, but it did not enter the net. (AP PhotoJulio Cortez)

Colorado Avalanche goaltender Philipp Grubauer, of Germany, watches as a shot by the New Jersey Devils goes by him during the second period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The shot hit the post, but it did not enter the net. (AP PhotoJulio Cortez)

Colorado Avalanche left wing Matt Calvert (11) skates with the puck as New Jersey Devils center Jean-Sebastien Dea (10) chases him during the first period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. (AP PhotoJulio Cortez)

Colorado Avalanche left wing Matt Calvert (11) skates with the puck as New Jersey Devils center Jean-Sebastien Dea (10) chases him during the first period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. (AP PhotoJulio Cortez)

Colorado Avalanche left wing Matt Calvert (11) skates against New Jersey Devils defenseman Damon Severson (28) during the first period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. (AP PhotoJulio Cortez)

Colorado Avalanche left wing Matt Calvert (11) skates against New Jersey Devils defenseman Damon Severson (28) during the first period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. (AP PhotoJulio Cortez)

Philipp Grubauer stopped 27 shots to pick up his first win of the season, including a glove save of Kyle Palmieri's shot with 44 seconds left that preserved Colorado's one-goal lead.

Colorado Avalanche left wing Gabriel Landeskog (92), of Sweden, celebrates after scoring a goal as New Jersey Devils goaltender Keith Kinkaid (1) and defenseman Mirco Muellerr (25), of Switzerland, look on during the third period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The Avalanche won 5-3. (AP PhotoJulio Cortez)

Colorado Avalanche left wing Gabriel Landeskog (92), of Sweden, celebrates after scoring a goal as New Jersey Devils goaltender Keith Kinkaid (1) and defenseman Mirco Muellerr (25), of Switzerland, look on during the third period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The Avalanche won 5-3. (AP PhotoJulio Cortez)

Rantanen scored on an empty-netter with 12 seconds left and added three assists, giving him a league-leading 11 this season.

Taylor Hall had a goal and two assists for the Devils, who lost for the first time after opening the season with four straight victories.

More AP NHL: https://apnews.com/NHL and https://twitter.com/AP_Sports

A shot by Colorado Avalanche left wing Gabriel Landeskog, not pictured, of Sweden, enters the net of New Jersey Devils goaltender Keith Kinkaid (1) for a goal during the third period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The Avalanche won 5-3. (AP PhotoJulio Cortez)

A shot by Colorado Avalanche left wing Gabriel Landeskog, not pictured, of Sweden, enters the net of New Jersey Devils goaltender Keith Kinkaid (1) for a goal during the third period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The Avalanche won 5-3. (AP PhotoJulio Cortez)

Colorado Avalanche goaltender Philipp Grubauer, of Germany, watches as a shot by the New Jersey Devils goes by him during the second period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The shot hit the post, but it did not enter the net. (AP PhotoJulio Cortez)

Colorado Avalanche goaltender Philipp Grubauer, of Germany, watches as a shot by the New Jersey Devils goes by him during the second period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The shot hit the post, but it did not enter the net. (AP PhotoJulio Cortez)

New Jersey Devils center Travis Zajac, center, is helped off the ice by left wing Miles Wood (44) after taking a hit against the Colorado Avalanche during the second period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. (AP PhotoJulio Cortez)

New Jersey Devils center Travis Zajac, center, is helped off the ice by left wing Miles Wood (44) after taking a hit against the Colorado Avalanche during the second period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. (AP PhotoJulio Cortez)

Colorado Avalanche goaltender Philipp Grubauer, of Germany, watches as a shot by the New Jersey Devils goes by him during the second period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The shot hit the post, but it did not enter the net. (AP PhotoJulio Cortez)

Colorado Avalanche goaltender Philipp Grubauer, of Germany, watches as a shot by the New Jersey Devils goes by him during the second period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. The shot hit the post, but it did not enter the net. (AP PhotoJulio Cortez)

Colorado Avalanche left wing Matt Calvert (11) skates with the puck as New Jersey Devils center Jean-Sebastien Dea (10) chases him during the first period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. (AP PhotoJulio Cortez)

Colorado Avalanche left wing Matt Calvert (11) skates with the puck as New Jersey Devils center Jean-Sebastien Dea (10) chases him during the first period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. (AP PhotoJulio Cortez)

Colorado Avalanche left wing Matt Calvert (11) skates against New Jersey Devils defenseman Damon Severson (28) during the first period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. (AP PhotoJulio Cortez)

Colorado Avalanche left wing Matt Calvert (11) skates against New Jersey Devils defenseman Damon Severson (28) during the first period of an NHL hockey game, Thursday, Oct. 18, 2018, in Newark, N.J. (AP PhotoJulio Cortez)