MONTREAL — Coach Claude Julien called Montreal's loss against the league-worst Arizona Coyotes "embarrassing."

The Canadiens blew three leads as the Coyotes came from behind to win 5-4 on Thursday to earn their first regulation victory of the season.

"It's more embarrassing than frustrating," said Julien. "Unacceptable, especially given how we played in the first period. To be unable to remain concentrated for the next two periods. We've been talking about this team for two days, that we had to be careful.

"Very disappointing from us tonight."

Montreal (8-10-2) took a 2-0 lead into the second period but the Coyotes clawed their way back into the game. With the Canadiens up 4-3 in the third, Arizona scored twice on the power play to snap a five-game losing skid.

The last-place Coyotes (3-15-3), which have the worst goals-per-game ratio in the league, scored five goals for the first time this season. They had a combined five goals in their previous four games.

"This is what we were doing early on in the season when we were losing games," said Brendan Gallagher, who scored Montreal's first of the evening. "We had to learn that lesson early on, but we fell back into some old habits. We get sloppy and take our foot off the gas pedal. We didn't work."

Down 4-3, Derek Stepan got Arizona level for the third time in the encounter with a wrist shot from the crease at 4:54 following a failed clearance by Jordie Benn. Gallagher was in the box for tripping.

Arizona scored again on the power play at 10:10, this time with Shea Weber penalized for slashing, when Brendan Perlini's shot ricocheted off Christian Fischer's stick and in for the winner.

"The win is huge but the way we won is even better," said Fischer. "We were so resilient the way we played, with contributions from top to bottom. We had a couple of good fights, which sparked us. Just an awesome team win."

The Canadiens are 2-2-1 so far on their six-game homestand, which caps off Saturday against the Toronto Maple Leafs.

Montreal jumped to a 2-0 lead in the first period through goals by Gallagher and Paul Byron. Gallagher dangled around Antti Raanta by quickly switching from his backhand to his forehand at 10:48 before Byron doubled Montreal's lead at 13:56 with a one-timer that just trickled over the Arizona goalie's glove.

The Canadiens lost for the first time this season when leading after the first period (3-1-0).

The teams combined for five goals in a back-and-forth second period.

The Coyotes made it 2-1 at 4:30 when Brad Richardson found a hole between Charlie Lindgren's pads with a slap shot from the point.

Christian Dvorak got the equalizer five minutes later, jumping on a loose puck in the crease just as a penalty to Weber expired.

Montreal regained its lead when Joe Morrow ripped one off the post and in, seconds after Clayton Keller missed a breakaway at the other end of the ice.

Tobias Rieder made it 3-3 at 19:09 of the second but Weber answered back 40 seconds later, beating Raanta blocker side in the top corner after a Canadiens faceoff win.

"We got sloppy in the second period," said Weber. "We didn't take them lightly, we just didn't get the job done. They got momentum in the second period when we were playing sloppy. It wasn't good enough."

Andrew Shaw thought he scored the equalizer for Montreal late in the third period but the goal was overturned after a video review deemed he kicked the puck in with his skate.

Raanta made 33 saves for the win in net. Lindgren, who allowed more than two goals for the first time this season, stopped 27-of-32 shots.

Notes: Goaltender Antti Niemi, claimed off waivers by the Canadiens on Tuesday, was Lindgren's backup. … Montreal native and young tennis phenom Felix Auger-Aliassime was in attendance.