DENVER -- Gabriel Landeskog had a goal and two assists and the Colorado Avalanche scored three times in the third period to beat the Calgary Flames 5-4 on Thursday night.
Matt Duchene and Paul Stastny had a goal and an assist each for Colorado. David Jones and Ryan O'Byrne also scored for the Avalanche.
Jarome Iginla scored twice for the Flames.
The game was a sidelight to the teams' matchup off the ice. Early Thursday, the Flames announced they had signed Avalanche restricted free agent Ryan O'Reilly to an offer sheet. Hours later, when the teams were in the first period, Colorado matched the offer to retain its leading scorer from last season.
The terms of the deal weren't released, but TSN in Canada reported the contract was for two years and $10 million. According to TSN, O'Reilly will get $1.5 million this year, $6.5 million the second year and a $2 million bonus.
Flames general manager Jay Feaster said the Flames discussed trading for O'Reilly but "the price to acquire the player via trade was too steep. We felt it would negatively impact our future, so we made the decision to go ahead with the offer sheet."
Perhaps buoyed by the news their teammate was back, the Avalanche rallied. They got within 3-2 midway through the second period on goals by O'Byrne and Jones. Iginla gave the Flames a two-goal cushion with his fifth goal of the year with 6:44 left in the period.
Landeskog scored 23 seconds into the third to cut it to 4-3 and Stastny tied it off a rebound six minutes later.
Duchene got the winner midway through the third, his seventh goal of the season.
Calgary took a 2-0 lead when Jay Bouwmeester and Mike Cammalleri scored 33 seconds apart five minutes into the game. Iginla made it 3-0 with 54 seconds left in the first.
NOTES: Entering Thursday, Calgary had won seven straight in Colorado and earned a point in eight consecutive games at Pepsi Center. ... The Flames on Thursday traded defenseman Joe Piskula to Nashville for forward Brian McGrattan. McGrattan, who signed a one-year contract with the Predators last summer, has not played a game for Nashville this season. He recently finished a two-week conditioning assignment in the AHL. ... The Flames are one of four teams in the league to have not allowed or scored a short-handed goal. Anaheim, Minnesota and Phoenix are the others. ... Varlamov has started 16 of Colorado's first 20 games. ... Iginla now has 91 career goals against Colorado.