CARL RUSSO PHOTOS: It seemed like history might be on the verge of repeating itself.

 Last year, Pentucket surrendered a 20-point lead in its state semifinal loss to Foxborough, and after jumping out to a 17-point lead over Pembroke in Wednesday’s Division 2 state semifinal at the TD Garden, the Titans stormed all the way back and threatened to hand the Sachems another painful defeat.

 Pembroke sophomore Kaitlyn Howe completed the comeback with a 3-pointer midway through the third, giving the Titans their first lead of the game at 35-34. At that point Pentucket coach John McNamara wasn’t sure what was going to happen next, until he looked out and saw senior tri-captain Maddi Doyle calling out to her teammates.

 “She was like, ‘We got this! We got this!” McNamara said, making a ‘calm down’ gesture with his hands. At that point he knew everything was going to be alright.