ANAHEIM, Calif. (AP) -- Rickard Rakell is perhaps the only Anaheim Ducks forward who should feel good about his offensive game lately, and even he was mired in a five-goal goalless streak when the surging Boston Bruins visited.
Rakell came through with two scores in a game that reminded the Ducks they can still fill a net on occasion.
Rakell scored the tiebreaking goal with 2:34 to play, and the Ducks snapped Boston's four-game winning streak under new coach Bruce Cassidy with a 5-3 victory Wednesday night.
More from FoxSports
Rakell also scored in the second period for the Ducks, giving him 24 goals in his outstanding season. Ondrej Kase, Josh Manson and Andrew Cogliano also scored for Anaheim, and Jonathan Bernier made 26 saves in his first victory since Jan. 23.
The Ducks had scored just five goals in their previous four games during an up-and-down February, and they had just four goals in 258 minutes before Kase scored early in the second. They can't afford much of a slump in the Pacific Division race with San Jose and Edmonton, but the Ducks are keeping pace.
"It was nice to get the bounces tonight," said Rakell, who tapped home a loose puck for the game-winning goal. "We've been having a tough time over the last couple of games to get something going. It was nice that we were able to help the team."
The Ducks killed five Boston power plays, but Frank Vatrano slipped behind Manson and scored on a breakaway with 8:25 left.
Rakell then scored after the puck deflected off Corey Perry, who had two assists. Cogliano got credit for an empty-net goal with 48.7 seconds left when Torey Krug hooked him to the ice with a clear path to the net.
"Five is a nice number, but three is the better number," Anaheim assistant coach Paul MacLean said. "Our defensive game was a real big reason why we ended up winning the game. We had a couple of goal posts that helped us as well."
The Bruins hadn't lost since Cassidy replaced Claude Julien on Feb. 7. Defensemen Brandon Carlo and Zdeno Chara scored early goals, and Tuukka Rask stopped 20 shots as Boston lost to Anaheim for the seventh straight time.
"I thought we played hard to get back into the game against a good hockey team that defends well," Cassidy said. "I think the guys are frustrated. The positive with that is we knew we could have won that hockey game if we just took care of a few things here or there. Nothing worse than going out of a game thinking you had no chance. We definitely had our chance."
Bernier started his second straight game in place of John Gibson, a late scratch with a lower-body injury. He made a handful of jaw-dropping saves, including a diving stop of Patrice Bergeron with his stick.
"You don't want to make those saves, because it means you're out of position," Bernier said.
Forward Nic Kerdiles made his NHL debut for the Ducks, becoming the first player from Orange County to suit up for Anaheim.
Kerdiles lived in Irvine for most of his childhood and regularly attended games at Honda Center before the club drafted him in 2012. The 23-year-old scorer missed several months earlier this season with a concussion, but has played 10 outstanding games for the Ducks' AHL affiliate in San Diego.
Matt Beleskey returned to the Bruins' lineup after sitting as a healthy scratch in two of the previous three games. The longtime Ducks forward, who got a $19.8 million contract from Boston after scoring a career-best 22 goals for Anaheim in 2014-15, hasn't had a goal in 17 games since Nov. 19.
NOTES: The Ducks recalled Jhonas Enroth from San Diego to back up Bernier. Enroth, acquired from Toronto in December, has suited up for five NHL teams in just over two years. ... Boston F Tim Schaller was scratched for the second time in three games. ... Chara played his 798th game for the Bruins, the most by a European player in franchise history.
Bruins: At Kings on Thursday.
Ducks: At Kings on Saturday.