SCARBOROUGH — When you think about it, it’s actually pretty simple: if you want to beat Scarborough High’s powerhouse softball team, all you have to do is play a perfect game.

Biddeford, as it has so often, came close Friday afternoon. But the Tigers blinked in the bottom of the seventh inning and Scarborough scored two runs with two outs to grab a stunning 4-3 victory. The Red Storm strung together four consecutive hits, with Chloe Griffin knocking in the tying run and Kaleigh Scoville the winner with a single to center.

It was Scarborough’s only lead of the game and capped a third straight 16-0 regular season for the Red Storm, who will go into the regional playoffs as the No. 1 seed in Class A South. Third-ranked Biddeford is 12-4.

“We come here, we play seven solid innings and … they find a way, they find a way,” said Biddeford Coach Ray Magnant. “I think this team can play with anybody in the league and we showed it today. Now we’ve just got to put together seven mistake-free innings, because that’s what it takes to beat this team.”

It was Scarborough’s 57th consecutive regular-season victory. Given that 11 of Scarborough’s wins this year have been by at least 10 runs, it was also a very satisfying win.

“You can’t get any better softball than that,” said Scoville. “Throughout the season, some of the games haven’t been that close. It’s just nice to be in that environment and see that we can still produce.”

Biddeford scored all its runs in the first inning on a towering three-run homer by sophomore catcher Brook Davis, perhaps the most dangerous hitter in the conference. But the Tigers were held in check the rest of the way, first by starter Abbie Murrell and then by Griffin, who came in to pitch in the fifth.

Biddeford starter Kirsten Lebreux was very effective as well. She gave up a run in the first, then had the Red Storm off balance. At one point, she produced eight outs on 12 pitches.

Then in the sixth, two infield errors led to a Scarborough run that cut it to 3-2. But freshman shortstop Grace Martin threw out the potential tying run at the plate.

In the seventh, Biddeford center fielder Jocelyn Moody made a spectacular backhanded diving catch in the left-center field gap for the first out. A grounder to third baseman Erin Martin produced the second out.

But Scarborough pinch-hitter Hunter Greenleaf reached on an infield single. Then Maggie Murphy lined a pitch off Lebreux’s leg, the ball ricocheting away, with Greenleaf going to third.

Up came Griffin. On a 1-1 pitch, she grounded a single up the middle to score Greenleaf with the tying run.

“Those are the moments we practice for, that we love,” said Griffin. “We live for those moments with the runner on third, bottom of the seventh.”

Three pitches later, Scoville lined a single to center and the speedy Murphy scored the winning run. “I just wanted to get a single,” said Scoville. “I have confidence in Maggie. She’s so fast, I knew if I hit anything in the outfield she was scoring.”

“They’re just confident hitters,” said Scarborough Coach Tom Griffin. “We got together and some of the kids said, ‘This was fun.’ This is what we’ve been waiting for. And they were nice and relaxed.”

And so Scarborough again is undefeated going into the playoffs.

“Obviously it’s special, but it’s not really what we’re going for,” said Scoville. “We’re not finished yet.”