BOSTON (AP) -- The Montreal Canadiens were struggling through their worst stretch of the season. Then they had to play two of the hottest teams in the NHL.
They beat both -- decisively.
Peter Budaj stopped 34 shots and the Canadiens ended the Boston Bruins' four-game winning streak with a 4-1 win Thursday night. The victory came just two days after they stopped Carolina's four-game winning streak with a 3-0 win.
"It's good for the confidence," Montreal coach Michel Therrien said. "Even when things weren't going our way, we tried to stay positive."
The Canadiens had been outscored 19-5 in losing four consecutive games. The Bruins had won their previous four games by a combined score of 21-8.
But Boston was outplayed from start to finish.
"We didn't skate. We didn't execute, and we didn't make good decisions," Bruins coach Claude Julien said. "We weren't very good."
The Canadiens were outstanding. Their speed and emotion put them in front of the Bruins all night long.
"This was close to a complete game for us," said Daniel Briere, who scored Montreal's last goal while playing just 7 minutes, 39 seconds. "We needed that after spending the last week dropping some big games and by big scores as well."
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.
"I play as long as they tell me to play," he said. "You'd like to stop everything, right? But, today, I didn't."
The Bruins had scored six goals in each of their previous three games. The Canadiens scored five times during their four-game slide.
"Usually, when you go through tough stretches, people have a tendency to panic," Budaj said. "Tonight we played well against a really good team."
The losing streak ended Tuesday night against Carolina when Carey Price stopped 36 shots in his third shutout of the season. Budaj was nearly as good while improving his career record in Boston to 4-0 with just five goals allowed.
"We played well against a really, really good team," he said. "This building is always rocking. It's always exciting to play these type of games."