FREEPORT — The schedule facing the Gray-New Gloucester High baseball team going into the week was daunting, with games against three of the top four teams in the Class B South Heal points – Wells, York and Freeport.

With the Patriots clinging to the 11th and final playoff spot, an 0-3 week might have meant doom.

Instead, Gray-NG upset No. 1 Wells on Tuesday, then backed up that win with a 4-3 victory Friday at Freeport.

It was the second straight loss for Freeport (10-5), which might be forced to play a preliminary-round tournament game after dropping out of the top five with only one game remaining. Gray-NG (9-6) has moved up to 10th place, safely in the tournament field.

The Patriots broke a 3-3 tie in the sixth. Freeport starting pitcher Heath Cockburn retired nine straight batters before cleanup hitter Will Shufelt blooped a single over the third-base bag. Cockburn’s only walk followed, and Cooper Winslow followed with an RBI single to right field.

GNG reliever Eli Winchester took over for starter Damien Pye in the fifth inning and retired eight of the 11 batters he faced, with three strikeouts, one hit and two walks (one intentional).

“This is a really big win, knowing that we have knocked off two of the top four teams in the league this week,” said Winchester. “We focused on winning the week, and that worked out for us.

“I was focused on the zone, those outside corners.”

Pye, a left-hander, worked his curveball around a sneaky fastball that had the Falcons reaching in the first three innings. Winchester, a hard-throwing righty, gave Freeport a different look.

“We could have gone the other way, but we felt Damien going (first) was right because you just don’t see a lefty very often,” said Gray-New Gloucester Coach Brad Smith. “We had three different scenarios, and Plan B was to bring in Eli. The kids knew the plan.”

Cockburn had a bit of bad luck. In the first inning, Winchester and Josiah Rottari reached on bloop singles. Winchester and Rottari worked a double steal, with Winchester scoring the first run.

“Heath threw all right. He didn’t have his best stuff, but lately we have not been making the routine plays in the field, and that cost us again today,” said Freeport Coach Bill Ridge.

Freeport tied the game in the bottom of the first, with Finn Johnston driving in Jack Sawicki.

Pye’s perfectly-placed bunt opened the third inning, and Nick McCann singled to put runners at the corners. An error allowed Pye to score, and a fielder’s choice grounder by Shufelt brought in McCann to give the Patriots a 3-1 lead.

Freeport hitters figured out Pye the second time through the lineup. In the fourth, Toby Holt launched a double off the fence in left-center. Gabe Wagner followed by hitting the ball to almost the same spot, but 10 feet further, for a tying two-run homer.

Cockburn went six innings, allowing seven hits and one walk with four strikeouts. Shea Wagner pitched a scoreless seventh, permitting a two-out single by McCann, who was 2 for 4.

Freeport threatened in the sixth, with Gabe Wagner working a walk and stealing second with one out. But, Winchester stranded him there, picking up a strikeout and a shallow flyout.

In the seventh, Josh Burke pinch hit and singled to right, and pinch runner Eriksen Shea moved to second on an error. A ground ball by Sawicki (2 for 3, walk) moved Shea to third before Winchester retired Johnston on a ground ball to second.

“This was a great, great game. This is what you live for, the great games,” Smith said, whose team ends its regular season Monday with a home game against Cape Elizabeth.

“We try not to look at the Heal points, but we’ve lost three games by one run and we know the record is not indicative of who we are. We play for today. This one is in the rear-view mirror by the time we get home, and we focus on (Cape Elizabeth) next.”

Freeport visits Yarmouth for its regular-season finale, also on Monday.

“For us, the playoffs start now. We know that we’re going to get in, it is just where are we going to finish?” said Ridge.