ORONO, Maine — University of Maine first-year football coach Joe Harasymiak’s first win certainly didn’t come easy. And it’s safe to assume he’ll never forget it.

After spotting Bryant University of Rhode Island a 21-0 lead, the Black Bears salvaged a dismal first-half performance by scoring on the final play of the half and then erased a 17-point second-half deficit on Saturday to stun Bryant University with a 35-31 win at Alfond Stadium.

UMaine (1-3) snapped a seven-game losing streak while Bryant fell to 2-3.

“We’re very excited to get our first win of the season,” Harasymiak said. “Obviously, in the first half, we weren’t us. We had to put a charge in them at halftime. We told them the second half may define who they are this season. I’m proud of the guys. They could have folded but they stuck together and played better football. The defense came up with some huge stops and we moved the ball up and down the field.”

Freshman running back Josh Mack rushed for 151 yards on 21 carries and scored three touchdowns, with two of them coming down the stretch as Maine scored the game’s final 21 points.

He scored on runs of 25 and 9 yards with the 9-yarder putting UMaine ahead with 10:36 left. His runs followed a 38-yard touchdown pass from Dan Collins to Jaleel Reed.

“In my mind, I was just thinking [I needed to run] north and south,” Mack said. “Against [James Madison University] last week I made a bad run. So I was thinking north and south and that they couldn’t tackle me. I was pretending I was a bully.”

“The speed he was playing at was very fast, especially for a young player,” Bryant coach Marty Fine said. “He was different than their other backs. His suddenness, his change of direction, his agility, his vision [made him different].”

Senior quarterback Dan Collins overcame a poor first half (7-for-21, 81 yards, three interceptions, one touchdown) to finish with 14 completions in 31 attempts for 180 yards and two touchdowns.

Mack’s 20-yard run with 38 seconds left in the first half started the final series and Harasymiak said that gave him the green light to try to cut into the 21-0 deficit rather than just let the clock run out in the half since they were out of timeouts.

Collins threw a 31-yard pass to Micah Wright to put the ball at the three-yard line with two seconds left and Collins flipped a touchdown pass to Wright as time expired.

“That was definitely a turning point for me. Micah made a great play. That gave me confidence,” Collins said. “The guys believed in me.”

“Dan gave me a chance to make a play. If we hadn’t scored, we would have been in serious trouble,” Wright said.

Ricky Perez’s 35-yard field goal to open the second half gave Bryant a 24-7 lead.

Mack then capped a seven-play 62-yard drive with a 2-yard touchdown run to cut the lead to 24-14 but Bryant quarterback Dalton Easton’s fourth touchdown pass of the game — his third to Matt Sewall — an 18-yarder, made it 31-14 with 3:57 left in the third period.

Bryant wouldn’t threaten again as the Bulldogs generated just 44 more yards of offense.

Maine senior defensive end Pat Ricard, who had eight tackles including three sacks, said the UMaine defense was “sick of the way we were playing. We started believing in each other, we executed and we got the job done.”

“[Ricard] is some football player. He changed the game, at times, by himself,” Fine said.

Fine shouldered the blame for “bad play-calling” especially in the fourth quarter.

“We became too predictable. We needed to run the ball more to try to keep our defense off the field,” he said.

Bryant was down to its No. 3 running back, Ryan Black, due to injuries to their top two running backs and he sustained a minor knee injury and was ineffective (10 carries, 15 yards).

Easton’s fourth touchdown pass was the 56th of his career which ties the school record. He completed 27 of 53 passes for 318 yards and the four touchdowns. He was intercepted by DeAndre Scott with 1:48 remaining as Maine sewed up the win.

Following Easton’s final touchdown pass, Maine responded with a six-play, 65-yard drive after Scott’s 44-yard kickoff return. Collins threw a perfect strike to Reed for a 38-yard score.

On the ensuing drive, Bryant was forced to punt from its own 30 and Wright returned the punt 53 yards to the B-25 before Mack rattled off a nifty 25-yard touchdown run to cut the lead to 31-28.

“We focused on our punt returns all week because we thought our punt return team was superior to their punting team,” Wright said. “The guys blocked for me and I found the hole.”

Maine’s game-winning drive followed a shanked nine-yard punt by Bryant’s Drew Chretien that gave Maine great field position at the B-49.

A 12-yard pass from Collins to Reed on third-and-eight extended the drive and a 16-yard pass from Collins to Jared Osumah set up Mack’s game-winning nine-yard touchdown run.

Bryant built a 21-0 lead in the first half as Easton threw touchdown passes of 28 yards to Keenan Thompson, on a third-and-25 play, and 25 and 18-yarders to Sewall. The 18-yarder to Sewall came with just 42 seconds left in the half and followed Danny Hughes’ dazzling 49-yard interception return.

But Maine answered on the Collins-to-Wright connection to gain momentum entering the second half.

Wright (5 catches-53 yards) and Reed (4-for-81) were Maine’s top pass catchers and Ricard, strong safety Jason Matovu and linebacker Christophe Mulumba Tshimanga led the defense with eight tackles each.

Sewall (7-for-89), Taylor Barthelette (5-for-83) and Black (5-for-38) were the Bulldogs’ top receivers and linebacker Jesse Nemerowicz (13 tackles) and free safety Charles Keenan (10) paced Bryant’s defense.

Maine returns to Colonial Athletic Association play at Delaware at 3:30 p.m. Saturday, Oct. 8.