ORONO, Maine — It may have taken sophomore defenseman Rob Michel 45 games to score his first goal but it couldn’t have come at a better time.

Michel scored a shorthanded goal with three seconds left in the second period to snap a 2-2 tie and give the University of Maine a 5-2 Hockey East victory over No. 5 UMass Lowell on Friday night at Alfond Arena.

Senior center and assistant captain Blaine Byron had a hat trick to extend his points streak to five games (4 goals, 4 assists) as Maine snapped a seven-game winless skein (0-5-2).

Rob McGovern finished with 31 saves for UMaine (4-5-2, 1-2 HE) while freshman Tyler Wall made 22 for the River Hawks (6-3-2, 2-1 HE).

Senior center Cam Brown’s first goal of the season, coming at the 9:27 mark of the third period, expanded the lead to 4-2 and Byron’s shorthanded, empty-net goal supplied him with his hat trick and sewed up the win.

The teams play again Sunday at 3 p.m. in Lowell, Massachusetts.

Byron staked UMaine to a pair of leads in the entertaining and free-wheeling first period but Gage Hough and John Edwardh answered for the River Hawks.

UMass Lowell carried the play over the first half of the second period and Hough hit the post with a shot from the high slot through a posse of bodies.

But the Black Bears generated some chances late in the period and used a 3-on-2 rush to create Michel’s goal.

Brown carried the puck down the left wing with Byron driving to the net at the far post. Michel jumped into the play and was left unattended in the middle of the slot.

Brown found Michel with a pass and Michel took a few strides before wristing a 20-footer past Wall.

“Mark Hamilton did a great job blocking a shot and we cleared it,” said Michel. “I jumped into the play and Brown found me. I knew their goalie was weak high so I out-waited him and put it to his blocker side.”

UMaine coach Red Gendron said the fact Byron kept going to the net made the goal possible.

“If Blaine had stopped, one of their defensemen would have been able to step up on Rob,” pointed out Gendron.

Brown made it 4-2 when Brendan Robbins’ shot glanced off Wall’s shoulder and he swept the rebound into a half-empty net.

“We played a full 60 minutes tonight,” said Brown, who had three assists to go with his goal.

Both goalies had come up with some terrific saves in the second period.

Wall robbed Mitch Fossier, who was set up for a one-timer by Brown, and McGovern thwarted C.J. Smith, who one-timed a pass from Joe Gambardella.

Byron had opened the scoring just 37 seconds into the game with a shot from a tight angle that squeezed past Wall into the short side.

“The coaches are always telling me to shoot,” said Byron.

Hough tied it when he was sent in alone by Michael Kapla and jammed the puck past McGovern.

Byron poked home a Patrick Holway rebound as the puck pinballed near the crease but Edwardh’s slick redirection of Dylan Zink’s point shot late in the first period tied it.

“The better team won tonight,” said UML coach Norm Bazin. “They played with more urgency. They were getting to a lot more pucks first.”

“I thought we played well the entire game,” said Gendron. “Our backchecking was tremendous and I thought we got the puck out of our own end pretty well.”

He was also pleased with the play of his special teams and lauded McGovern’s performance, saying he made some “big saves in the second period when the score was 2-2.”