MONTREAL -- Defenceman Jeff Petry scored two goals as the Montreal Canadiens ended a three-game losing streak with a 5-2 victory over the Anaheim Ducks on Saturday afternoon.

Logan Shaw, Joe Morrow and David Schlemko also scored for the Canadiens (21-25-6), who will play host to the Ottawa Senators on Sunday afternoon.

Corey Perry and Rikard Rakell scored for Anaheim (25-18-10), which was coming off an overtime loss in Ottawa on Thursday night.

The Ducks outshot Montreal 45-29, but Antti Niemi, starting in place of Carey Price, made several brilliant stops to pick up his second win in a row since his last start on Jan. 19 against Washington.

Canadiens forward Jonathan Drouin left the game early in the second period Saturday afternoon after being hit by a slapshot from teammate Karl Alzner.

The Ducks led 9-0 in shots just under six minutes into the game, but the Canadiens then scored three times on seven attempts to chase starter Ryan Miller at 10:13 in favour of Reto Berra, who was called up on Friday to replace the injured John Gibson.

Shaw, who was claimed on waivers from Anaheim on Jan. 15, scored his first as a Canadien at 6:16 when he banged in a Byron Froese pass from the edge of the crease. Morrow added one on a power play on a one-timer of Victor Mete's pass from the right point at 8:17.

Alex Galchenyuk slid a pass to Schlemko to score from the slot at 10:13.

Berra lunged for but couldn't reach Petry's slow moving shot along the ice 3:45 into the second frame.

Perry put Anaheim on the board during a two-man advantage at 8:32 as he beat Niemi from the edge of the crease and Rakell followed in to score on Nick Ritchie's rebound at 12:15.

Petry picked the top corner on a power play at 15:46 of the third.

Jacques Demers, who coached Montreal to its last Stanley Cup in 1993, got a big ovation when he was shown on the scoreboard. Demers made a rare visit since a 2016 stroke left him with limited mobility.