FREEPORT — With a bye to the quarterfinals at stake, Gray-New Gloucester and Freeport played a game worthy of the tournament-like atmosphere on Senior Night at Freeport High School.

John Martin’s three-point play with 2:42 left gave the Patriots the lead for good in what had been a see-saw battle to that point, and they held on for a big 55-52 win Thursday night.

Martin scored 15 of his game-high 20 points in the second half for Gray-New Glouccester, which earned a bye to the Class B South quarterfinals with the win. Freeport will likely have to play a preliminary round game.

“We do a lot of time-and-score (situations) in practices, so it was just natural for us,” Martin said. “We just got good shots and knocked them down.”

Josiah Rottari added 13 points and Nate Pelletier 11 for the Patriots. Toby Holt led the Falcons with 16 points, while Ethan Sclar chipped in with 15 points and Eriksen Shea 12 points.

In a worthy sequel to their first game in Gray, which the Patriots pulled out in overtime, neither team led by more than four points for the first 30 minutes. That’s what the Falcons’ cushion was early in the fourth quarter when Pelletier hit the first of his two 3-pointers of the period to pull the Patriots back within one, 43-42.

Pelleter’s second trey with 5:44 left put Gray-NG up 46-44. Nate Thomas then drove the baseline successfully to tie it, but that would be Freeport’s last field goal of the game.

“The biggest thing was keeping them off the boards, and going to 2-3 (zone) in the last two minutes slowed them down,” Gray-New Gloucester coach Ryan Deschenes said. “They were a little unsure of themselves and I thought the guys did a great job of that adjustment slowing them down down the stretch.”

Martin put the Patriots in front to stay with a leaner while drawing contact. His subsequent free throw and 3-pointer gave them the largest lead of the game, 52-47 with 1:47 left.

“We left a couple of their shooters open late, and they were tough ones for us to bounce back from,” Freeport coach Bill Ridge said. “That was really similar to the first time we played them.”

“He made big shots,” Deschenes said of Martin. “He’s a junior but he’s been playing for us for a long time and he’s played a lot of big games. Besides foul shooting, we did well tonight.”

The Patriots couldn’t convert from the foul line to pull away, and Sclar’s 3-pointer bounced in to get the Falcons back within two with 24.3 seconds left. Pelletier then coolly knocked down a pair at the charity stripe and Martin made one-of-two to widen the lead to five again.

Holt hit a pair from the line to make it a one-possession game again, and Martin missed two to keep the Falcons’ hopes alive, having to go the length of the floor with 1.8 seconds left. But, out of a time out, Zachary Brady picked off Freeport’s inbounds pass and time ran out.