VANCOUVER — Returning indoors helped the Montreal Canadiens get back on track.

Nicolas Deslauriers had the first two-goal game of his career as Montreal defeated the Vancouver Canucks 7-5 on Tuesday.

Jeff Petry, Daniel Carr and Phillip Danault each added a goal and an assist for Montreal (15-15-4), which travelled to the West Coast after falling 3-0 to the Ottawa Senators in Saturday’s frigid outdoor NHL 100 Classic in the nation’s capital.

“It felt like in practice yesterday and this morning we were sucking dirty pond water when we were breathing,” said Canadiens captain Max Pacioretty, who had two assists. “It was good to get back (and play inside).”

Paul Byron and Alex Galachenyuk had the other goals for the Canadiens, who got 34 saves from Carey Price.

The fourth line of Deslauriers, Carr and Byron Froese combined for five points as 14 players found the scoresheet for Montreal.

“I’m not here for my points,” said Deslauriers. “But if I can contribute like this and take some pressure off our top line, it means a lot.”

Montreal entered play 1-3-1 over its last five following a five-game winning streak that coincided with Price’s return from a lower-body injury.

“It wasn’t the ideal way to win,” said Petry. “What I liked is when they capitalized and scored it seemed like we pushed back quickly.”

Thomas Vanek scored three times and added an assist for Vancouver (15-16-4), while Daniel Sedin and Brock Boeser each had a goal and an assist. Anders Nilsson stopped 25 shots for the Canucks, who also got two assists from Henrik Sedin.

“There’s nothing sweet about it,” Vanek said of his 10th career hat trick. “We’re really struggling right now.”

Despite having now dropped six of their last seven in regulation by a combined 36-14 score, the Canucks insisted that Tuesday was an improvement over Sunday’s 6-1 home loss to the Calgary Flames.

“Tonight was a lot better,” said Vanek. “It was a step in the right direction.”

Vancouver head coach Travis Green was asked if he agreed with that assessment.

“It was a step in the right direction,” he said. “(We) had almost 40 shots, scored five goals on a pretty good goalie, played a lot more aggressive, our compete level was a lot higher.

“I thought it was a step in the right direction.”

Tied 3-3 in a wild middle period, Petry gave Montreal the lead for good with 46.1 seconds left when his shot from the point on the power play beat Nilsson through a screen.

The defenceman’s fourth goal of the season came three seconds after Vancouver’s Alex Biega was whistled for cross-checking — a call that left Green fuming.

Byron then made it 5-3 at 1:37 of the third after getting a second bite at the apple on a nifty behind-the-back feed from Pacioretty for his 10th following a sequence where the Canucks’ defensive zone coverage left a lot to be desired.

Boeser, who left the Canucks’ loss to Calgary after taking a shot off his left ankle, hit Vancouver’s second post of the night behind Price in the second period, but made no mistake with 6:31 to play by ripping his 18th to make it 5-4.

The Canadiens again went up by two with 2:33 left when Galchenyuk scored his eighth before Vanek buried his third of the night and 10th overall off a scramble with 61 seconds still on the clock.

But Danault finally put the game to bed in the dying moments with Nilsson on the bench for an extra attacker.

After Vanek and Carr traded power-play goals in the first, Montreal grabbed the lead at 7:18 when Petry glided over blue line and found Froese, who in turn fed Deslauriers for his second of the year.

Vanek responded by finishing off a nice passing play at the side of the net with six minutes left in the period to make it 2-2.

Deslauriers then put Montreal back ahead at 17:05 on a 2-on-1 break with his second of the game on a shot from just inside the blue line Nilsson will want to have back.

“You’re not going hear our goalies sit there and say they’re playing their best hockey of the year,” said Green. “But if you’re trying to get me to throw blame on our goalies, I’m not going to do that.”

The seesaw battle continued 34 seconds later when Daniel Sedin tapped home a loose puck into an open net to make it 3-3 off a Vanek shot that hit Montreal’s Thomas Plekanec, who in turn wiped out Price, before Petry put Montreal ahead for good late in the period.

“There’s games that’s going to be 2-1, there’s games that are going to be like that,” said Deslauriers. “You want to keep the scoring tight, but we responded well after every goal.”

Notes: The Canadiens were without Shea Weber because of a foot injury that is being re-evaluated. The Canadiens were 4-2-1 over a seven-game stretch last month while their star defenceman was dealing with the same issue. … Vancouver visits San Jose on Thursday, while Montreal is at Calgary on Friday.