WEST HARTFORD, Conn. — The University of Maine had ample opportunities to win Saturday night’s America East quarterfinal against Hartford.

Instead, the host Hawks drew off the energy of a raucous home crowd, and an inspired performance by junior forward Genesis Maciel, to escape with the victory.

Maciel drained his fifth 3-pointer of the game with 31 seconds left, lifting sixth-seeded Hartford to a 66-63 men’s basketball quarterfinal victory over No. 3 Maine at Chase Family Arena.

“My mind was right and I just let it go,” said Maciel, who poured in a career-high 19 points, including five 3-pointers, to propel the Hawks (11-19) into Sunday’s late semifinal against No. 2 Boston University.

Coach Ted Woodward’s Black Bears finished at 15-15, losing eight of their last nine games. It was UMaine’s sixth straight loss in the postseason.

“It hurts that we lost, but it really breaks my heart, there’s a pit in my stomach, that I couldn’t perform better for my seniors,” said junior Gerald McLemore, who was among three Bears with 13 points.

Defensively, UMaine contained most of the Hawks’ 3-point shooting threats. Hartford, which hit a league-best 250 3-pointers (8.6 per game) during the regular season, shot only 6-for-23 in the game.

Hartford instead exploited its quickness advantage in the post by spreading out the Bears and attacking the basket while scoring 34 points in the paint, 14 by Anthony Minor.

“Our goal certainly was to make them take some contested twos, not give them situations where they got some layups, and not give them open threes,” Woodward said. “The balance that they got tonight certainly made them very dangerous on the offensive end.”

Ultimately, UMaine’s poor free-throw shooting may have been the difference. The Bears went 10-for-17 from the foul line, with all seven misses coming in the second half.

Seniors Terrance Mitchell and Malachi Peay each missed two foul shots to book-end a 10-0 UMaine run that turned a seven-point deficit into a three-point lead — one that could have been as large as seven.

“To win those games, you’ve got to come up with every single point and, unfortunately, we didn’t,” Woodward said.

“I really thought our guys fought hard,” he added. “Give Hartford credit, they certainly stepped up and made some key shots when they had to.”

The Hawks responded by scoring eight unanswered points, forcing the Bears to come behind. UMaine never closed the gap.

Up 63-62, Hartford called timeout with 36.2 seconds left. The Hawks quickly got the ball inside to Minor, who kicked it out to an open Maciel for the eventual game-winner.

“That’s a tough shot, a pressure shot, and he made it,” McLemore said.

The Hawks shot 60 percent (12-for-20) from the floor in the second half.

“Unfortunately, we did have some trouble coming up with defensive stops,” Woodward said. “That’s something that we had trouble fixing down the stretch (of the season).”

Raheem Singleton made one free throw seven seconds later and UMaine fouled. Hartford’s Joe Zeglinski missed a front end and Sean McNally rebounded for the Bears.

UMaine called timeout and eventually worked the ball to McLemore, whose 3-pointer from the top of the key missed with five seconds left.

Hartford’s Zeglingski rebounded, was fouled and missed another front end, but the Bears couldn’t get a shot off in time.

“We thought we put ourselves in a position to win the game,” Woodward said.

“We had to find another way to get it done and it didn’t happen for us, unfortunately,” said UMaine senior Troy Barnies of Auburn.

Minor finished with five rebounds, three assists and five steals for the Hawks. Zeglinski added 10 points and five boards.

Hartford made eight of 12 foul shots.

UMaine placed five players in double figures, including 13 points from Mitchell, who hadn’t practiced since spraining his right foot in the last regular-season game. He provided UMaine with an emotional lift.

“It meant everything,” Mitchell said of being able to play. “Even when I went down against Albany and I didn’t know the extent of my injury, I knew on Saturday that I’d play.”