Gray-New Gloucester guard Nick Pelletier (4) shows his wingspan while defending Freeport’s Eriksen Shea (13) during a boys’ basketball game at Freeport on Thursday. Pelletier scored nine fourth-quarter points to help rally Gray-New Gloucester to a 57-56 victory. (The Times Record photo by Bob Conn)

FREEPORT — Throughout the second half of Thursday’s Western Maine Conference boys’ basketball game, Freeport’s defense did the job in containing dangerous Gray-New Gloucester guard John Martin.

After scoring 12 first-half points, Martin had nothing to show for his efforts while looking for room in the second half. That is, until the closing seconds when he found rare space in the paint and scored the go-ahead bucket for a 57-56 Patriots win.

The win gives Gray-NG a 2-1 record, while the Falcons suffered their first loss (2-1).

“This is huge. Our schedule is pretty tough, and we definitely needed this,” said Martin, who finished with 14 points and three steals.

With Martin tied up, the Patriots turned to guard Nick Pelletier and forward Hunter Colby. Pelletier hit three 3-pointers in the fourth quarter to help erase a 10-point Freeport lead, and Colby scored seven of his team-high 17 points down the stretch, along with pulling down 13 rebounds.

“Pelletier hit some big shots to put us back in it, and John made that shot,” Gray-NG coach Ryan Deschenes said. “This is huge for us, worth a lot of Heal points. Freeport is as good as anyone.”

Freeport’s focus on Martin, and a tough defensive effort in the third quarter, helped Freeport turn a 30-21 halftime deficit into a 44-36 advantage through 24 minutes.

“We were focused on Martin coming in, one of the top players in the conference if not the state,” Freeport coach Bill Ridge said. “We kept track of where he was and he had trouble even floating away from the ball. We had someone right on him.”

After the visitors darted out to a 6-2 lead, Freeport used an 8-0 run for a 10-6 lead midway through the opening quarter. Kaleb Barrett and Toby Holt each scored five points for the Falcons.

But the Patriots answered, ending the first eight minutes on an 11-0 spurt. Martin scored seven straight points during the run.

“It was going to be a game of runs,” Ridge said.

Martin kept it going in the second quarter, stepping back and draining a trey for a 20-10 lead. Nicholas Kariotis scored four points, and Colby added a bucket as the Patriots went to the half with a nine-point lead.

The third quarter was a nightmare from the start for Gray-NG. It took less than four minutes for the Falcons to jump into the lead, with a three-point play by Gabe Wagner making for a 36-34 Freeport advantage. Toby Holt, who led all scorers with 18 points, drove the lane for two, and a 3-pointer by Barrett had the Falcons in control, 44-36, after 23-6 third-quarter scoring advantage.

“Credit to Freeport. They threw different defenses at us and they kept us out of the paint in the third quarter,” Deschenes said. “We were rattled, a 17-point swing, and with a good team you can’t let that happen. We have to dig deep there. We have to do a better job of breaking it.”

“Offensively, we made the one extra pass, the ball reversal, penetration and a kick out, a pass to the big,” Ridge said. “The five we put out there played well together.”

Holt finished off a pass from Wagner for a 46-36 Freeport lead, but Pelletier and Zackary Pomerleau brought the Patriots back, hitting back-to-back 3-pointers to get the visitors to 46-42.

“They were guarding the 3 a lot more, but it opened a lot for my teammates, and we were able to make the run and come back and get the win,” said Martin, who watched Pelletier swish two more from long distance, drawing Gray-NG to within four points, 52-48, with 3:16 remaining.

Trailing 56-50 two minutes later, Colby plowed inside and scored while being fouled. He made the free throw for a key three-point play, then moments later scored again to draw the Patriots to 56-55. After a Freeport miss, Martin put the Patriots ahead to stay.

Freeport had a chance to score, but Colby pulled down a rebound, and Gray-NG played giveaway for a 18 seconds before Martin was fouled with less than two seconds remaining. He missed the front end of a 1-and-1, allowing Freeport to set up a play. But, the inbound pass hit the netting high above the gym floor, and one last full-court heave by Shea ended the game.

“In the fourth quarter we panicked, forced some shots, and with the lead there was no need for it,” Ridge said.

Wagner chipped in 11 points for Freeport, which shot 40 percent (22-fo-54) from the floor and made 8-of-13 at the free-throw line. Barrett added nine points and five rebounds, with Shea Wagner scoring all eight of his points in the second half. Eriksen Shea had five points, four assists and three steals.

Pelletier finished with 13 points and three assists, and Pomerleau chipped in seven points.

Freeport hosts Traip Academy on Wednesday at 7 p.m., while the Patriots entertain Cape Elizabeth on Tuesday at 7 p.m.

Gray-New Gloucester forward Ryan Lachance looks to the basket in front of Freeport defender Elias Thomas during the first half of Thursday’s WMC boys’ basketball game at Freeport. The Patriots rallied for a 57-56 victory. (The Times Record photo by Bob Conn)