SOUTH BERWICK — The first six innings in the Western Class A baseball semifinal flew by with second-seeded Marshwood leading third-ranked South Portland, 4-1.

Then came the wild seventh inning, with a total of 12 runs, and South Portland holding on for a 9-8 victory Saturday.

With the bases loaded and one out, South Portland reliever Griffin Kelley preserved the one-run lead by retiring the last two batters on a strikeout and grounder.

“I was feeling (the pressure),” Kelly said. “I usually do when I come out of the pen. This time it was to the max.”

South Portland (14-4) will meet top-ranked Portland (14-4) in the final Wednesday at St. Joseph’s College in Standish.

The Red Riots beat Portland 4-0 earlier this year on a one-hitter by left-hander Henry Curran, who will be available Wednesday.

With Curran not available Saturday, the Red Riots started Sam Troiano, who held Marshwood to three runs on five hits over four-plus innings.

“Sam did a great job,” South Portland Coach Mike Owens said. “He’s only a sophomore and this is his first playoff experience.”

Brad Sowerby relieved for two innings. Kelley got the last three outs.

Zach Quintal of Marshwood allowed seven hits and three walks through six innings, but one run.

“Zach Quintal left it all on the field today and that’s what you’re supposed to do when you’re a senior,” Coach Bryant Lausberg said.

The Hawks scored two in the fourth (RBI singles by Zack Doyon and Cole McDaniel) and two in the fifth (Jake Lebel’s two-run single).

South Portland threatened often but managed one run on Anthony Degifico’s single in the fifth.

“We have had a lot of chances all year, but haven’t seemed to get that clutch two-out hit,” Owens said. “Then it all seemed to happen in one inning.”

South Portland began the seventh with singles by Matt Beecher and Degifico, chasing Quintal.

A walk loaded the bases, bringing Jacob Brown to the plate.

“I’ve been in that situation several times during the year and I swung at bad pitches every time,” Brown said.

This time he swatted a fastball to deep left for a two-run double, closing the score to 4-3.

Ben Conti singled in the tying run, then stole second to put runners on second and third. Both Brown and Conti scored on a wild pitch for a 6-4 lead.

A single (Sam Solomon), a walk and two errors brought in three more runs. Marshwood (14-4) came to bat trailing 9-4.

A Zach Hodges single and two walks loaded the bases for Lebel’s single. A hit batter brought in another run and Kelley relieved. He sandwiched RBI walks around a strikeout, keeping the Red Riots up 9-8, but with the bases still loaded. Then he got the last two batters.

“He didn’t get rattled and made the pitches when he had to,” Owens said.