BANGOR, Maine — The University of Maine women’s basketball team appeared on its way to a comfortable victory over archrival New Hampshire at the Cross Insurance Center on Monday night.

But a 15-point halftime lead evaporated to two in the final 34 seconds before clutch free throws by Mikaela Gustafsson and Bella Swan in the final 21.4 seconds enabled UMaine to escape with a 59-55 victory.

UMaine is 19-7 overall and 10-1 in America East, and UNH fell to 8-15 and 2-8.

Gustafsson’s two free throws made it 57-53 with 21.4 seconds left and, after UNH freshman Ashley Storey of Cumberland converted an offensive rebound with a baseline jumper, Swan sank a pair of free throws with 8.3 seconds remaining.

“I just stayed calm,” said Swan about her clinching free throws.

Sigi Koizar and Swan finished with 20 points apiece for the Black Bears, and Swan went eight for nine from the free throw line, all in the second half.

Swan also grabbed seven rebounds and had two assists.

Koizar had six rebounds and three assists to go with three steals. She was four for five from beyond the arc.

“She’s the best perimeter player in our league,” said UNH assistant coach Brendan Copes who was subbing for his wife, head coach Maureen Magarity, who recently gave birth to their second child.

Gustafsson wound up with 10 points, four assists and four steals. Liz Wood had just three points but contributed eight rebounds, six assists and two steals.

Elizabeth Belanger had a game-high 21 points for UNH, and she had five rebounds. Carlie Pogue had 12 points and six rebounds, and Aliza Simpson dished out 11 assists. Storey added eight points as did Morgan Barrett-Smith.

Koizar had 15 points in the first half to help stake UMaine to a 35-20 lead.

She connected on five of her six field goal attempts and was a perfect three for three from beyond the 3-point arc. She also grabbed five rebounds and dished out two assists.

The Black Bears used a 15-5 run in the second quarter to build the lead to 33-16 thanks to Koizar’s five points and three-pointers by Wood and Lauren Bodine.

Pogue, who didn’t play in the first quarter, supplied seven points and four rebounds for UNH in the second quarter.

Swan had eight points and four rebounds in the first half.

UMaine shot 50 percent from the floor while UNH was 33 percent.

UMaine went just 2-for-11 from the floor in the third quarter and UNH pecked away at the lead. Bassett-Smith came off the bench scored all eight of her points to help pull UNH within nine.

“We have a lot of girls who can score,” said Copes.

Storey’s short jumper capped a string of six unanswered points in the fourth quarter to make it 46-43.

Swan and Gustafsson combined on a nice give-and-go down low to start a UMaine run of six straight points with Swan adding a free throw and Koizar nailing a 3-pointer.

A traditional three-point play by Swan off another Gustafsson feed made it 55-45 with 2:15 remaining.

“We work on that a lot in practice,” said Swan referring to the give-and-gos with Gustafsson.

But Belanger scored eight straight points to make it 55-53 with 34 seconds left.

“We know how we can play and we didn’t show it in the first half,” said UNH’s Belanger. “We came out with fire in the second half.”

“We stopped being aggressive offensively in the second half. They didn’t do what we told them to do. And New Hampshire made some shots,” said Maine coach Richard Barron, whose team shot 27.3 percent in the second half compared to UNH’s 62.5 percent.

“We have to play to win instead of just trying to keep the lead,” Koizar said.