BANGOR, Maine — The Class A Bangor High School boys’ hockey team was desperate for a win when it faced off against Class B Hampden Academy on Wednesday night at Sawyer Arena in Bangor, the home rink of both teams.

The Rams, who had lost four of their last five and scored just two goals in those four setbacks, received goals from Richie Trott, Marc-Andre Perron, Chase Caron and Mike Moscone to build a 4-0 lead. They survived a pair of Bronco third-period power play goals by Lucas Dunn and Andrew Crouse to emerge with a 4-2 victory.

Bangor improved to 5-8-1 overall and earned valuable Heal Points in its quest to earn a playoff berth. Four of its five wins have come at the expense of Class B teams in Brewer twice, John Bapst of Bangor and Hampden Academy. The Broncos fell to 6-6-1.

The Rams had been shut out in their previous two games.

Bangor and Hampden Academy played to a 2-2 overtime tie on Dec. 14.

Bangor’s Liam Doughty and Hampden Academy’s Aaron Donovan, both seniors, finished with  21 saves apiece.

“It was nice to be back on the winning side again,” said Bangor coach Quinn Paradis. “We played a great first period. We put two [goals] in, and that was the energy and tempo we were looking for.

“We played a little sloppy in the third. Penalties killed us. That first five minutes was tough so we have to clean that up and then on to the next battle,” Paradis added.

“We crashed the net a lot better this game,” said sophomore right winger Perron, who shares the team in goals with Moscone with seven apiece. “Our penalty killing was pretty big, especially with that five-minute [major]. They may have scored a couple goals, but they definitely could have gotten a lot more if guys weren’t working hard down low.”

Junior defenseman Trott opened the scoring 3:53 into the game when Mike McLean won a faceoff draw back to him at the right point. He floated a wrist shot through a host of players that beat the screened Donovan to the short side for his first goal of the season.

Perron expanded the lead just under seven minutes later off a pass from Miles Randall, who sliced from left to right across the low slot and flipped it to him at the far post.

“Miles threw it on net, it took a couple of bounces and I put the brakes on at the top of the crease and put it five-hole,” said Perron.

Freshman center Caron made it 3-0 at the 6:21 mark off a Randall assist.

“Chase made a good pass to me. and I tried a wraparound. But the puck rolled off my stick through the crease and Chase buried it,” said Randall.

It was Caron’s first goal.

Junior left wing Moscone scored on a shorthanded breakaway at the 10:04 mark of the middle period.

“I tried to go five-hole but it went off (Donovan’s) stick and just trickled in,” said Moscone.

A five-minute major penalty at the end of the second period gave the Broncos some life, and they capitalized 33 seconds into the third period when sophomore right wing Dunn scored his eighth of the season on a wrist shot from the right circle that squeezed between the pads of Doughty.

Bangor then took a minor penalty 1:17 into the third period and Hampden took advantage of the 5-on-3 when senior left wing Crouse swatted home a Colin McKay rebound for his sixth goal.

But the Rams protected the lead efficiently by swarming the puck and limiting Hampden Academy’s time of possession with it.

“Bangor capitalized on its opportunities and we didn’t,” said Hampden coach Zach Wilson. “Hats off to Bangor for playing hard. They wanted it more than we did.”

Up next: Both teams are on the road on Saturday as Bangor travels to Falmouth and Hampden visits Presque Isle.