BOSTON -- Peter Budaj stopped 34 shots and the Montreal Canadiens ended Boston's recent scoring binge with a 4-1 win over the Bruins on Thursday night.

The Canadiens won their second game in three nights after losing four in a row. They also stopped a four-game winning streak for the Bruins, who had 21 goals in that stretch.

Alexei Emelin and Max Pacioretty scored before Dougie Hamilton's goal cut Montreal's lead to 2-1 after one period. Brian Gionta made it 3-1 at 11:54 of the second, ending goalie Tuukka Rask's night. He was replaced by Chad Johnson, who allowed the first shot he faced, by Daniel Briere, to get past him less than two minutes later.

The Bruins had scored six goals in each of their previous three games.

The Canadiens had been outscored 19-5 during their losing streak, which ended when Carey Price stopped 36 shots in his third shutout of the season in a 3-0 win over Carolina on Tuesday night. That win also snapped a four-game winning streak.

Boston remained in first place in the Atlantic Division and second in the Eastern Conference but was outskated in the first period when Montreal dominated early on. It was quite a change for the Bruins, who were the aggressors from the start in their previous two games.

They outshot Florida 19-8 in the first period of a 6-2 win Tuesday night. That came one night after they took 18 of the first 20 shots in a 6-3 win over the New York Islanders.

But they fell behind early Thursday night and never caught up.

Emelin got his first goal in 32 games this season when he converted a slap shot from the right point with four players standing right in front of the crease just 2:16 into the game.

Pacioretty scored his team-leading 23rd goal at 14:32. He received a pass along the left side in centre ice, skated behind the defence and put a short backhander behind Rask.

But Hamilton scored his fifth goal just a minute later.

Neither team had many good opportunities in the first half of the second period. But less than two minutes later, Tomas Plekanec took a power-play shot from the right circle and Gionta tipped it in for his ninth goal.

Briere finished the scoring with a shot Johnson had little chance to stop. With three Bruins chasing him and only the goalie in front of him, Briere fired a 10-foot forehand shot over Johnson's shoulder.