WESTBROOK — Gorham broke a 10-10 tie with two goals 12 seconds apart in the closing minutes and held on for a 12-11 win over Westbrook in the Western Class A boys’ lacrosse quarterfinals Wednesday night.

No. 5 Gorham (10-3) moves on to the semifinals Saturday at No. 1 South Portland (11-1). It will be their first meeting this season.

No. 4 Westbrook finishes at 9-4.

“Both teams played phenomenal lacrosse today and both goalies stood on their heads,” said Westbrook Coach Josh Plowman.

Indeed, both Gorham’s Carter Landry (11 saves) and Westbrook’s Alex Leblanc (10) made some point-blank shots to keep this game ultra-close.

Cam Wright paced Gorham with three goals and three assists. Westbrook’s Curtis Knapton recorded four goals and two assists.

“That was a great game,” Gorham defenseman Cody Rioux said. “Westbrook’s a great team. The last time (the teams played) we didn’t come out strong. We played a great 48 minutes today.”

When these two teams last met, May 18, Westbrook took a 4-0 lead on its way to a 9-7 win.

On Wednesday, Gorham jumped ahead 3-1 after 3:17.

“We knew if we didn’t start hot, it would be a difficult game for us,” Gorham Coach Dan Soule said. “We started hot and it still was a difficult game for us. But we persevered and made good decisions.”

Gorham led 10-9 when Knapton tied it, spinning away from three defenders and scoring with 3:35 left.

Gorham’s Wright passed to Alex York in front but Leblanc blocked the shot. The Blue Blazes tried to gather the loose ball and feed it back to Leblanc, but it got by for an own goal and an 11-10 Gorham lead with 2:42 left.

“That’s when you’d rather be a spectator than a coach,” Plowman said.

Gorham’s Michael Susi won the next faceoff, charged in and scored for a 12-10 lead with 2:30 remaining.

Westbrook missed three shots on its next possession. Gorham got the ball, but Susi had it stripped by Stephen Shackley. Westbrook rushed down. Knapton passed to Ryan Shackley, who scored, closing to 12-11 with 51 seconds left.

“I’m thinking this can go either way,” Susi said. “I’m thinking we really have to fight on this faceoff.”

Susi won the faceoff and the Rams played keep-away. Susi ran around for the last 17 seconds.

“I was winded but ran circles and managed to keep it in my stick,” Susi said.

Susi finished with two goals, as did York, Abraham Eaton and Tristan Brunet. Rioux led the defense with Mat Anderson and Ryan Hamblen.

Along with Knapton, Westbrook got two goals from John Tibbetts and Ryan Shackley. Noah Oliver, Tommy Kostopolous and Grayson Post each scored once.

“Over the last couple of years, we’ve really grown,” said Plowman, in his sixth year. “We went from a team that competed for three or four wins to a playoff team four straight years. Our goal was to get that first playoff win. We came just short but we played a great opponent.”