The Montreal Canadiens scored twice within two minutes of the third period to turn a 3-0 deficit into a one-goal game, and Arizona Coyotes goalie Antti Raanta wasn't happy.

He shouted at his teammates on the bench during a break in the action, and the Coyotes responded. They scored two goals and finished off a 5-2 win over the Canadiens Thursday night.

"Hopefully I don't need to do that anymore," Raanta said. "Great to get the win but also learn from those mistakes."

Raanta could laugh about it after the game, but coach Rick Tocchet and his staff were happy to see some fire from their No. 1 goaltender.

"That woke our team up. I love that," Tocchet said.

Brendan Perlini scored twice in a 19-second span in the second period, and the Coyotes got their third straight win and fourth in five games.

Perlini scored his first two goals since a four-game streak from Jan. 18-25. Tobias Rieder had a goal and assist in the third period to help the Coyotes hold off Montreal.

"We're just trying to get better every day. Last few games have been good for us but we still have a lot to learn and a lot to prove," Perlini said.

Clayton Keller had a goal and three assists, and Raanta made 34 saves for the Coyotes. They have earned points in five straight games.

The Canadiens, on the second night of a back-to-back after playing at Colorado on Wednesday, lost their fourth straight. Brendan Gallagher scored his team-leading 21st goal of the season.

Gallagher and Daniel Carr scored less than two minutes apart in the third to cut the Coyotes' lead to 3-2. Carr stuffed in the puck right after Arizona's Max Domi miraculously stopped a shot by reaching his stick across the goal mouth and knocking it away.

Rieder's power-play goal at 10:46 gave the Coyotes a key insurance goal. Then, Josh Archibald's backhander with 3:59 to play made it 5-2.

Keller's pass from behind the net found Perlini for Perlini's first goal 57 seconds into the second, and he got an assist on Perlini's breakaway goal at 1:16.

Oliver Ekman-Larsson also had three assists, the second one being the pass ahead to Perlini for his second goal of the night and 16th of the season.

Carey Price had 16 stops for Montreal.

Keller's third goal in five games gave the Coyotes a 1-0 lead at 13:56 of the first period. After a boarding penalty to Montreal's Max Pacioretty gave the Coyotes a power play, Keller took a pass from Ekman-Larsson and had plenty of time to load up a wrist shot that zipped past Price.

Keller had hit the goal post with a shot moments before. He registered his team-leading 17th goal of the season and set a career high with a four-point game.

"Good power play. Just getting shots early there leads to passing lanes," Keller said.

Raanta's best save of the night came just over five minutes into the game. He reached far to his left for a glove save on Nikita Scherbak's shot that was headed for the net.

"When you feel good, sometimes you can make that kind of save," Raanta said. "Need a little bit of luck also to get the puck straight to your paw."

The Canadiens outshot the Coyotes 36-21 but couldn't solve Raanta for the first two periods. A slashing penalty gave Montreal a power play early in the third, and Gallagher put in a rebound at 5:46, making the score 3-1.

"Can't dig yourselves holes, especially on the road," Gallagher said. "That's what cost us."

NOTES: The Coyotes opened a seven-game homestand Thursday, which will be their longest of the season. ... F Richard Panik was a healthy scratch. He'd been a top-line player, but has not scored a point in his last eight games. ... Jacob de la Rose and Carr were in the lineup for Montreal, replacing healthy scratches Nicolas Deslauriers and Byron Froese. ... A moment of silence for the victims of the school shooting in Florida was observed.

UP NEXT

Canadiens: At Vegas on Saturday night.