Freshman right wing Brendan Robbins’ goal just 23 seconds into the second period snapped a 1-1 tie, and senior defenseman Conor Riley ended a 40-game goalless drought 11:22 later to lead the University of Maine Black Bears to a 5-2 victory over the University of Massachusetts Friday night at the Mullins Center in Amherst, Massachusetts.

The Black Bears broke a six-game winless streak (0-4-2) while sending the Minutemen down to their seventh straight setback.

UMaine received 28 saves from junior goalie Matt Morris and improved to 6-15-6 overall, 3-8-2 in Hockey East.

It was just the second time this year Maine had scored more than four goals.

UMass fell to 7-15-4 and 2-10-4.

The two teams will play again at 7 p.m. Saturday.

Maine, UMass and the University of New Hampshire are now tied for 10th place, one point behind ninth place Merrimack and three behind UConn and Northeastern, who are tied for seventh in 12-team Hockey East

Blaine Byron and UMass’ Ivan Chukarov swapped first-period goals before Robbins and Riley supplied UMaine with a 3-1 lead it would never relinquish.

Freshman Chukarov’s first goal of his career came on a five-on-three power play.

Austin Plevy cut the lead to 3-2 on the power play 6:13 into the third period, but Brian Morgan and Steven Swavely scored 11 seconds apart just over two minutes later.

“We played real well five-on-five,” said Maine coach Red Gendron. “We were good in all phases of the game. Everybody was locked in and focused. We executed our systems.

“It was a nice win,” added Gendron. “But we need to stay out of the penalty box.”

UMass scored two power-play goals for the second straight game and went two-for-seven with the man advantage. The Minutemen also had a five-minute power play when Riley was assessed a major penalty for interference in the first period.

Maine had just two power plays and failed to score.

Robbins’ second goal of the season and second in four games came off a breakaway as he took a long pass from Will Merchant, busted down the right wing and beat UMass freshman goalie Nic Renyard with a short wrister from the middle of the slot.

Riley made it 3-1 with a wrist shot off a Byron feed.

“That was huge. It gave us a two-goal lead. It was a simple play. He jumped up into the attack and shot the puck right away,” said Gendron.

Riley’s goal was his first since he scored in a 6-4 win over New Hampshire on Jan. 23, 2015.

Maine carried the play to the tune of a 12-6 shot advantage in the second period but the Minutemen got back into the game on the power play early in the third period after Dane Gibson was assessed a hitting-from-behind minor.

Plevy, parked at the far post, swept home a precise pass from Ray Pigozzi, who held the puck until Plevy got free.

But Morgan responded just 2:06 later when he went to the net and jammed home a rebound off an Andrew Tegeler shot from a tight angle.

Swavely made it 5-2 when he regained the puck after his backhand pass was blocked and he fired a wrister past Alex Wakaluk, who had replaced Renyard at the outset of the third period.

Byron opened the scoring and extended his points streak to four games (2 goals, 4 assists) when he beat Renyard with a one-timer from the top of the left circle just 1:22 into the game.

Riley and Cam Brown had assists. Brown also extended his points streak to four games (2 & 3).

Chukarov tied it with a one-timer after being set up by Plevy and Patrick Lee.

Swavely, Robbins, Byron and Riley had a goal and an assist apiece.

Plevy had an assist to go with his goal for UMass and Patrick Lee assisted on both goals.

Maine outshot UMass 35-30.