SOUTH PORTLAND — When it needed goals, South Portland figured it would come off the stick of attack Andrew Whipple, who as a junior holds school records for assists in a game and a season.

The goals came off Whipple’s stick all right. Just not the way most people expected.

Whipple scored two goals in the fourth quarter Friday night to help South Portland hold off Kennebunk 14-9 in a boys’ lacrosse match at Martin Field.

“(Whipple’s) the drive behind our offense,” said South Portland Coach Tom Fiorini, referring to Whipple’s role as a setup man. “That’s the thing about Andrew. When you need him to, he’ll put the ball in the cage.”

After Josh Hussey cut the Riots’ lead to 9-6 with a hard outside shot that energized his teammates, Duncan Preston, who took over the draw in the fourth quarter, gained possession and got the ball to Whipple.

Whipple rolled from behind the cage to beat Kennebunk keeper Ben Bath (five saves) to make it 10-6. Kennebunk’s Donovan Conner (7:19 left) and Nicco Delorenzo (7:05) answered to make it a gut-clenching two-goal game, 10-8.

Then Preston came up with a key ground ball and fed it to Whipple, who crashed the net for an 11-8 edge with 5:28 left.

“I just do what I can to help us win,” Whipple said. “That second goal, I faked high and went low. Coach (Fiorini) said there’s no stopping, you keep going. So it’s what I did.”

Hussey scored again to make it 11-9 but Preston, Chis Mitchell and Leddy had goals in the final four minutes for the Riots (5-0).

The game was the latest chapter in a tightly contested rivalry. In their 2013 regular-season matchup, Thomas Leddy’s goal in the second overtime snuffed Kennebunk’s dramatic comeback to lift South Portland to an 8-7 win. Kennebunk recovered, though, rallying for an 11-9 victory in the Western Class A semifinals. Kennebunk (2-3) now competes in Class B.

“When you have a four-goal lead, they get two quick ones, it gets to you a little bit,” Preston said. “You just have to realize that what we were doing was successful. We just had to keep working together as a team and reach the ultimate goal, and win the game.”

Leddy led the Riots with five goals and an assist. Jack Fiorini had two goals and three assists, and Preston had two massive goals, the second one a momentum-shifting score off a rare win at the draw that gave South Portland a three-goal lead with four minutes left.

Tyler Elkington set the tone for Kennebunk with three goals and two assists. Hussey added two goals for the Rams (2-3). The most impressive stat of the night went to Patrick Gassman, who won 20 of 25 draws for Kennebunk.

“That’s Kennebunk, always with that push at the end,” Fiorini said. “We started to let them back in the game but the maturity took over for us. We stayed aggressive and played our defense, got stops and got the ball on offense. We’re a pretty electric offense. These guys see each other so well. If we get our possessions, we’ll be all right.”