BANGOR, Maine —- It was a grind for the top-seeded Fort Fairfield High School girls basketball team as eighth seed Calais took them down to the wire.

But senior guard Chelsey Pelkey wasn’t about to end her career on Tuesday night.

Pelkey scored a game-high 20 points, grabbed nine rebounds and had four steals and four assists to lead the Tigers to a 40-37 victory at the Cross Insurance Center.

It was 18-1 Fort Fairfield’s 13th straight win and earns the Tigers a berth in Friday’s 3:35 p.m. semifinal against fourth seed Penobscot Valley of Howland, which is 15-4 after eliminating Schenck of East Millinocket by the same 40-37 margin.

Taylor Churchill had eight points, three rebounds and two assists for the winners and Kayla Giberson had six points and six rebounds. Marissa Brouette had four points and Teresa Maynard added five rebounds and two blocked shots to go with a basket.

Impressive freshman Sydney Farrar had 13 points and eight rebounds for 13-7 Calais and Logan Huckins had 10 points and two assists. Faith Tirrell had six points and Prue Maxwell had five and Felicia Moholland had five rebounds. Maxwell collared four rebounds.

Pelkey was the difference in the second half as she had 11 points, six rebounds and three steals and she capped her evening by intercepting a pass as Calais tried to hurry the ball up the court to try to hit a tying 3-pointer.

She was also the Tigers’ primary ballhandler as they tried to protect the lead.

Fort Fairfield led 24-23 at the half but opened the second half with a 12-2 run to extend it to 36-25.

Churchill hit a long 3-pointer to open the half and, after Tirrell hit a short runner for Calais, Pelkey grabbed an offensive rebound and banked it in to trigger a string of nine unanswered points.

Pelkey then made an inbounds pass to Giberson for a six-foot jumper and took a Churchill inbounds feed and nailed a three-pointer from the left side.

Pelkey capped the spurt with a driving one-handed bank shot from the right.

Maxwell snapped the string by popping home her own rebound with 1:40 left in the quarter.

Pelkey began the fourth quarter by converting her own rebound before the Blue Devils rattled off eight straight points to pull within 38-35 with 1:58 left.

Maxwell fed Katie Erskine under the basket for a basket and Farrar hit a 10-foot runner before going the length of the court for a layup.

Again it was Pelkey who came to the rescue by converting a Churchill pass with a short baseline jumper to make it 40-35 with 1:40 left.

Pelkey grabbed a defensive rebound and was fouled but couldn’t convert.

Huckins hit a runner with 55 seconds left but Pelkey and her mates did a good job protecting the lead before Calais eventually reached the foul limit and sent Pelkey to the foul line with 7.7 seconds remaining.

Pelkey missed her free throw but stole the pass to cement the win.

Fort Fairfield used a 10-4 run to take a 16-8 lead after the first quarter and Churchill’s three-pointer extended the lead to 19-8 to open the second period.

But Farrar scored the next seven points to rally the Blue Devils.

Farrar converted a pair of traditional three-point plays and added a free throw to make 19-15.

Tirrell and Farrar tied it with consecutive baskets before Pelkey fed Churchill for a three-pointer and hit a 12-foot jumper to restore a five-point lead.

Huckins’ four-foot runner and Tirrell’s steal and layup at the buzzer closed out the half and pulled Calais within one.