Portsmouth’s Emily Whitney, right, is congratulated by teammates after breaking the school scoring record during Monday’s D-II Lacrosse game between Portsmouth and Bishop Guertin. (Matt Parker/Portsmouth Herald photo)

PORTSMOUTH — The lights were on, the fog was rolling back in and the lead had been frittered away.

In other words, the stage was set perfectly — if a little uneasily — for Emily Whitney to make some history for the Portsmouth High School girls lacrosse team Monday night.

Whitney, a senior attack, tied the game against Bishop Guertin late with her 239th career goal, one that broke the program record previously held by her sister, Sam, who graduated in 2009 and had a big senior season for nationally-ranked Division III Ithaca (N.Y.) College this spring.Her next goal gave her team the lead. But it took a free-position goal by teammate Devon Parker with 12 seconds left for the Clippers to escape a challenge from the visiting Cardinals — and their own mistakes — and sew up a 13-12 win in Division II.

“We have to do a lot of things better,” said Portsmouth coach Mary Squire. “That certainly wasn’t the way we wanted to win this game.”

The Clippers (11-1) got four goals apiece from Whitney and Olivia Eaton, three from Parker and two from Kaitlyn Finneral.

The final one came off the stick of the Syracuse-bound Parker, who — after her team won the faceoff that followed a game-tying goal by BG’s Jess Lambert with 47 seconds to go — bounced in a free-position shot from straight-on that all but secured the win.

“We really didn’t play to our capabilities today,” said Parker. “We’re all excited that we came out with a win but disappointed with the way we played overall.”

Whitney scored two of her goals in the first half, but needed the whole 50 minutes to surpass her sister’s mark. Afterward, she downplayed the accomplishment.

“I don’t think I want to tell her,” she said.

The late push helped the Clippers digest that they had let an 8-2 lead completely slip away, and needed a frenzied finish to avoid losing on their home field to a team they’d handled a little more comfortably in Nashua, 10-7, earlier in the season.

“We had a chance to take control of the game but we didn’t capitalize on a lot of things,” said Squire. “A lot of turnovers and a lot of missed opportunities. … You’ve got to be able to catch and throw.”

Down 8-4 at halftime but cradling some momentum, the Cardinals (7-3) scored the first three goals of the second half to pull within one, owning the edge in possession.

The Clippers re-inflated their edge to 10-7 thanks to goals by Eaton and Parker, which followed ground balls collected by Finneral and Lucy Gormley, respectively.

Whitney, meanwhile, was still stuck on her sister’s goal count of 238. She hit the post with a shot early in the half and later was thwarted close-in. The aggressive Cards scored the next four goals, winning nearly every faceoff, getting to nearly every loose ball and exhorting each other as their good plays strung together.

“Great fire in their belly,” said Squire. “We had to match that in the second half and we didn’t.”

“Really happy with the way my team handled the pressure today,” said first-year BG coach Mandy Rogers. “The first time we played Portsmouth we were a little hesitant.”

Callie Santos had her way most of the day for the Cardinals, scoring six goals. Nicole Pettiglio added two goals and two assists.

Her team down 11-10, Whitney made a lasting mark. With possession, she ran around the net on the right, curled in on the other side and found some space in front to tie the game and set the record. A few minutes later, with just under two minutes left, she converted a free position for No. 240 and her team led again, 12-11.

“I really didn’t think about it too much because I wanted to keep my head on winning, taking another step toward getting to the championship,” said Whitney. “I just wanted our team to come up with the win; I didn’t think about it at all for myself.”

It gets no easier from here for the Clippers after beating the team that ousted them in last year’s Division II semifinals. They host first-place Hanover (10-0) on Friday, and then play up a level with Division I leader Souhegan here next Monday.

“We have to do a lot of things better,” said Squire. “That certainly wasn’t the way we wanted to come out to start (this stretch).”