PITTSBURGH -- Anthony Richard scored the winning goal in the third period and the Montreal Canadiens beat the Pittsburgh Penguins 6-4 on Tuesday night.

Richard scored at 3:05 of the third period. He took a stretch pass from Justin Barron and beat Casey DeSmith to the glove side. Montreal rebounded from an 8-4 home loss against Colorado on Monday and snapped a seven-game losing streak.

Montreal, which won its first game in March, has lost eight of its last 10 games overall.

Josh Anderson scored an empty-net goal while the Penguins pressed for the tie. Mike Hoffman scored his 11th while Denis Gurianov, Jesse Ylonen and Joel Edmundson also scored for the Canadiens.

Sam Montembeault made 39 saves.

Jake Guentzel scored twice and Evgeni Malkin and Kris Letang also scored for the Penguins, who play significant back-to-back division games at the New York Rangers on Thursday and Saturday. Pittsburgh, which currently holds a wild-card spot in the Eastern Conference, has points in eight of its last 10 games.

Tristan Jarry started, but allowed four goals on seven shots. It was the fourth time in five games Jarry allowed four goals and the second time he was pulled.

DeSmith stopped 13 shots in relief.

Pittsburgh played the final 16 minutes with four defensemen. Jeff Petry didn’t take a shift in the third period and Jan Rutta left with a lower-body injury after he was hit with a shot.

Montreal had the first five shots of the third period and the only goal until Anderson’s empty netter with 35 seconds to go.

Pittsburgh scored twice in the first five minutes for an early 2-0 lead. But the Canadiens jumped ahead with three goals in the next 6:10 and another before the end of the first during a wild six-goal period.

Guentzel scored his 28th goal of the season and recorded his 400th NHL point just 21 seconds into the game. Guentzel is the fastest player from the 2013 NHL Draft class to 400 points.

Malkin scored a power-play goal on a one-timer from the point at 4:49, making it a 2-0 game. Pittsburgh has a power-play goal in 11 of its last 13 home games.

But the Canadiens scored the final four goals of the period.

Hoffman scored 32 seconds after Malkin’s goal and Ylonen tied it with a wrist shot from the point at 7:13 of the period.

Gurianov scored his third goal in as many games seconds after a penalty expired. Edmundson scored with 11 seconds left in the period on a slap shot from the point.

Pittsburgh outshot Montreal, 17-4, in the second period and evened the score.

Letang pulled Pittsburgh within a goal, 4-3, when he scored on a low shot from the point at 10:57 of the second period.

Guentzel tied the game at 4 with a power-play goal at 18:05. Guentzel, who has five goals in his last five games, tipped a Malkin blast from the right point.

UP NEXT

Canadiens: Visit Florida on Thursday.

Penguins: Play the first of consecutive games at the New York Rangers on Thursday.