DURHAM — One line handled all the scoring for the University of New Hampshire men’s hockey team in its 3-2 overtime win over archrival Maine with 6,152 fans in attendance Friday night at the Whittemore Center.

The victory was the Wildcats’ first over Maine since Dec. 30, 2016.

Ara Nazarian scored twice, including the game-winning goal, and assisted on linemate Charlie Kelleher’s second-period goal. Jackson Pierson, the center of the line, finished with three assists.

Nazarian scored the game-winner from the left circle 1:01 into the extra frame after Pierson won a faceoff against Maine’s Chase Pearson in the left circle. Nazarian dragged the puck away from traffic and fired home a wrist shot past goalie Jeremy Swayman.

With the win, UNH (10-8-8, 6-5-5 Hockey East) tied Providence College for sixth in the Hockey East standings. Maine (9-13-3, 5-6-3) is in eighth place. Only eight of the league’s 11 teams make the postseason tournament.

The Wildcats improved to 8-1-3 over their last 12 games and 3-1-8 in its 12 overtime games, which is tied for a single-season program record.

“Great job by Pierson and people might not have noticed it but Charlie Kelleher did a great job holding his guy up on the draw and that gave me some time to just find the puck and just get a shot on net,” Nazarian said. “And luckily, it went in.”

Maine’s Pearson knotted the score at 2-2 with 2:11 left in regulation, when he redirected a Sam Becker one-timer from the high slot. The goal marked Pearson’s team-leading 13th of the season.

Emil Westerlund’s rebound goal pulled Maine within one goal with 8:14 remaining in the third frame.

UNH killed off the Black Bears’ third power-play advantage, which began with 2:32 left in regulation, to get to overtime.

“We worked our tails off to come back in the third period and gave ourselves a chance to win it in overtime and that’s a pretty good thing to do,” said Maine coach Red Gendron, who is from Berlin. “We want to be able to put a few pucks in the net a little sooner than the third period. It might make it a little easier.”

UNH coach Mike Souza said his team was “lucky to get to overtime.”

“We got badly outplayed in the third period,” Souza said.

The Wildcats opened the game’s scoring 7:20 into the first period, when Nazarian buried a one-timer off a cross-ice feed from Pierson on a two-on-one rush.

Kelleher scored off a dish from Nazarian to double UNH’s lead 4:46 into the second period.

UNH goaltender Mike Robinson, a sophomore from Bedford, registered 38 saves, 19 of which came in the third period.

Swayman, the reigning Hockey East Defensive Player of the Week and Boston Bruins draftee, made 31 saves.

Both teams went 0-for-3 with five shots on goal on the power play.

The Wildcats host Maine again tonight at 7, marking the final regular-season meeting between the two programs. The game is sold out.

“Fortunately, we made one more play than (Maine) did and won the game but I just think (tonight), we just can’t let them come back if we have the lead,” Nazarian said.