DENVER — All the positivity gained from a six-game winning streak was at odds after the Avalanche’s disappointing 5-3 loss Thursday to the Anaheim Ducks at Ball Arena. It’s one they’re willing to flush away, as long as they take some valuable lessons from it.

“We were giving up too much and they capitalized on their chances, so we got to take a hard look in the mirror,” superstar Mikko Rantanen said of Colorado’s third period, where it surrendered three straight goals. “What happened in the third, it can’t happen if we want to be successful.”

The Avs had a 3-1 lead with just over 21 minutes remaining and a 3-2 lead heading into the third. But Anaheim scored the last four goals to come away with the victory. It was just the seventh regulation win the Ducks have had all season, and it ended easily the best stretch of hockey Colorado had played all season.

Until Mason McTavish scored the go-ahead goal midway through the third period, the Avalanche had not trailed at any time over these past seven games. His tally was one of four that beat goalie Pavel Francouz, who made 27 saves and fell to 7-7-0 on the season.

Mikko Rantanen scored twice for the Avs, including a power-play tally that gave the Avalanche the two-goal lead they would later relinquish. Colorado’s other goal came from defenseman Samuel Girard. He also had an assist, a team-high seven shots and a plus-1 rating in 20:18.

“I like to really like the intensity Sam’s playing with recently,” coach Jared Bednar said.

Colorado welcomed Cale Makar and Denis Malgin back into the lineup. Makar had missed the previous four games and Malgin was out for three weeks. Matt Nieto — Wednesday’s trade acquisition from the San Jose Sharks — also dressed. He took the opening draw on the second line alongside center J.T. Compher and Rantanen. The opportunity to fly higher in the lineup was there because of an upper-body injury to Valeri Nichushkin.

All in all, there were quite a few changes to the lineup but those alone were not what led to the loss.

“I thought we were controlling the play for the most part,” Nieto said following his second debut with the Avalanche, where he played from 2017-2020. “They came out with more urgency than us in the third period and popped a couple home.”

Nieto was acquired late Wednesday night and flew to Denver from Carolina to join the team the morning of the game. He did not take part in the Avs’ morning skate but got a chance to meet with Bednar and the rest of the coaching staff to prepare for his debut.

“It’s been crazy but exciting,” Nieto said, recalling his past 24 hours. “I’m really happy to be back here. We didn’t come out with a win tonight, but you could feel the winning atmosphere in this room, and it’s something that I’m happy to be a part of now.”

Nieto finished with two shots and a plus-1 in 13:51.

“He’s one of the guys I liked tonight,’ Bednar said. “He’s another one of those guys that relies on the structure of the game. He’s always going to do the right thing. He’s hard on pucks. He’s always kind of shown that. You give him a checking role, he can step into that.”

The Avs came out flying from the opening draw. They had the first six shots and a goal before the Ducks got their first look at Francouz. Rantanen opened the scoring at 3:58, capitalizing on a rebound with Ducks goaltender John Gibson looking the other way.

Anaheim managed to tie things up before the break despite the Avs having an 18-7 shot advantage through 20 minutes. But Colorado regained momentum in the middle frame. First, superstar Nathan MacKinnon found Girard pinching backdoor to give the Avs a 2-1 lead early. Then, a power-play tally from Rantanen put the Avs up by multiple goals.

Anaheim answered back with a late second-period goal before scoring twice in a 24-second stretch to pull ahead. It later added a late empty-netter following a handful of golden opportunities from Colorado to tie it up.

Listen to “EMERGENCY PODCAST: Avs acquire Nieto & Merkley for MacDonald & Kaut” on Spreaker.