SCARBOROUGH — Their regular-season records were the same. Their play on the pitch was a back-and-forth battle with a near even number of scoring chances, shots and saves.

But the decisive inch or two went Scarborough’s way.

Jarod Glidden headed a free kick by Nate Needle that Marshwood goalie Pete Tsamparlis snared with both hands. From midfield, it appeared to be another in a series of top-flight saves by the senior keeper. But according to the referee, in quick consultation with his assistant referee who had a goal-line view, Tsamparlis had moved the ball over the goal line after catching it, resulting in the game’s lone goal with 17:14 to play in No. 3 Scarborough’s 1-0 Class A South quarterfinal win Wednesday.

“It was very close. It might have went in by that much,” Glidden said, holding his index finger and thumb an inch apart.

“I was right down the line and it was so close, I couldn’t even tell,” said Marshwood Coach Ben Deschene. “But hey, that’s what happens sometimes in soccer. A ref has to make a call. In a game like this, in the playoffs, when both teams are so closely matched, it is a game of inches.”

Scarborough (10-2-3) will play at No. 2 Falmouth on Friday. Falmouth beat Kennebunk 6-1 to advance.

No. 6 Marshwood, which tied Scarborough 3-3 in the regular season, finished 10-3-3.

After Glidden’s goal, the Hawks had  four chances for the equalizer but Scarborough keeper Alex Bachman was up to the task, especially on the two best looks.

Bachman reacted to a Marshwood header that skidded off the head of one of his defenders to tip the ball over the crossbar.

“I was just trying to make all the simple ones but that was definitely the high point,” Bachman said.

With 1:20 to play, Bachman covered a short-range shot by Owen Bynum who had gotten free in a cluttered crease area.

“I just try to sit in the hole and react the best I can. That was stress fest,” Bachman said.

Bachman finished with 10 saves. Tsamparlis, who made three sterling stops in the first half, had eight saves.

Marshwood, which controlled more of the game in the second half, finished with a 15-13 edge in shots. Both teams had seven corner kicks. All over the field, there was a constant series of contested plays for possession, highlighted by the efforts of Scarborough’s Zachary Chaisson and Daniel Travers and Marshwood’s Malcolm Connell and Aidan Knowles.

In the regular season, Marshwood converted on set plays against Scarborough and again was dangerous in such situations with left-footed Sam Fitzgerald repeatedly putting winnable balls into the box. Scarborough’s team defense prevailed, including one clear by Glidden on a free kick drive from 22 yards by Fitzgerald.

“We worked real hard on that all week. They hurt us on those the first time we played them,” said Scarborough Coach Mark Diaz.

Scarborough returns to the regional semifinal for the first time since 2016 and Diaz said he expects another battle against Falmouth.

“Every team is so tight, so close (in A South),” Diaz said.

Comments are not available on this story.