Credit Boston University for thinking out of the box.

Far and away the most penalized team in Hockey East, the Terriers changed their ways Thursday, matching their season-low by giving up just three power-play opportunities. Keyed by disciplined and spirited play, BU exploded for three third-period goals in a seven-minute span to break open a 2-2 game and beat New Hampshire, 5-2, in front of 3,443 fans at Walter Brown Arena.

Terrier Captain Freddy Meyer had a terrific game; he was on the ice for four of the five BU goals and neither UNH goal. He notched a goal and an assist, as did his teammates Brian McConnell and Frantisek Skladany. Meyer’s defensive partner, Bryan Miller, had just one assist but also played superbly in a stirring win for the Terriers (14-9-2, 8-7-0 HEA).

In a losing effort, Michael Ayers kept his team in the game longer than they deserved to be, making 37 saves. Tyler Scott and Preston Callander were the goal scorers for the Wildcats (16-5-3, 10-3-1).

“We’ve been playing great this year as far as five-on-five is concerned, but we’ve been struggling on the power play and the penalty kill,” BU Coach Jack Parker said. “Of late, we’ve done better on the penalty kill, and it was nice to get a couple of power-play goals.

“They outshot us two-to-one the last time we played them up there, and it was nice to outshoot them two-to-one here and win the game ourselves. I thought it was a really good effort.

Wildcats coach Dick Umile was characteristically terse in defeat. Asked for his general comments on the game, he said, “What game? We didn’t give them a game. They outplayed us, and we lost the game: no stories, no excuses.

“Michael Ayers kept us in the game; they just outplayed us tonight. Third period we had our chances 2-2, and we just let a guy walk around us, and that was the end of it.”

“It’s a huge win for us,” Terrier captain and New Hampshire native Freddy Meyer said. “The last three out we’ve lost [to Providence and Boston College twice] obviously — competing hard and just had some breakdowns in the third period and that was one of our goals tonight was to have it close and play real thorough in the third to win it.”

Playing a spirited game while maintaining discipline was critical for the Terriers.

“Yeah, everybody knows that’s a real focus,” Parker said. “We’ve got to stop doing that — guys have been punished for that and guys have lost ice time and game time for that. We’ve had a lot of man-hours missed because of penalties. So hopefully we’ve learned our lesson, but you never know.”

Holding the Wildcats to three power plays was great for the Terriers, but skunking them on the three attempts was huge.

“You’ve got to give Marky Mullen an awful lot of credit,” Parker said. “He’s doing a great job for us killing penalties — just seems to be in the right place at the right time in those situations.”

BU dominated the first period but was outscored nonetheless. The Wildcats took the lead early when Jim Abbott took an innocuous looking shot from the left point: Terrier goalie Sean Fields made the pad save but left a fat rebound. No one stepped up to clear it, and Tyler Scott knocked it home for the 1-0 lead.

Kenny Magowan knotted the game at one apiece when he took a Skladany feed off the right-wing boards and drove to the net, knocking the puck off of a skate and in at 13:50. With less than two minutes to play in the first, Preston Callander picked up a rebound behind the Terrier net, came around to the crease uncontested, and beat Fields short-side.

After some terrific plays by Mullen on a penalty kill in the second, the Terriers tied it up on a power play. Meyer made a great effort to keep the puck in the zone, sending a pass across the point from right to left just inside the blue line to Miller, who drove to the net before dishing across the slot to McConnell for a shot and goal at 14:02. Late in the second, Josh Prudden tricked Fields into sprawling on the ice before attempting a wraparound, but the Terriers scrambled to prevent a shot.

The Terriers got the game winner halfway through the third on a crowd-thrilling goal by David Klema after Matt Radoslovich set him up for a rush.

“Coach had been stressing all week to go wide on these guys ’cause their Ds don’t like to go wide; they like to funnel into the middle,” Klema said. “So I was thinking of going in the middle and then I realized, no, that wasn’t the thing to do.

“I turned it back out wide, and I think their goalie thought I was going to pass because I made a move to my backhand, and he slid off the post a little bit, and I stuck it between his leg and the post.”

Four minutes later, Colin Hemingway tried to stickhandle through several Terrier defenders in the neutral zone. Meyer stole the puck and went in to beat Ayers with a glove-side slapshot. Skladany sealed the scoring with a power-play goal after Mullen deflected a Meyer shot, only to have McConnell redirect it to Skladany for an easy tap-in.

The game-winner gave Klema a bit of redemption: After playing in every game his freshman season, he had been a healthy scratch for six games this season, including four in a row before coming back for the BC games last weekend.

“Before this year I’ve never sat out a game in my life — any level for being hurt or anything,” Klema said. “All I can do is listen to the coach: He knows a lot more than I do about the game. I’m going to respect all of his decisions.”

The two teams square off again at UNH on Saturday night.