SCARBOROUGH — “Ger-ry Wag-ner. Ger-ry Wag-ner.”

The Cheverus High student section knew when Gerry Wagner, the Stags’ senior midfielder, came on for a shift in the second overtime Wednesday night, chanting his name as he jogged onto the field.

Moments later it was hard to believe anyone in the stadium would soon forget him.

Wagner’s right-footed strike from 25 yards dipped into the far top corner with 5:35 left in the second overtime, lifting Cheverus to a 3-2 victory over unbeaten Scarborough in the Western Class A boys’ soccer final.

The Stags (10-4-4), the No. 7 seed in the regional tournament, will continue their magical playoff run Saturday when they play Lewiston, the Eastern champion, for the Class A title at Hampden Academy.

Cheverus last played in the state final in 2001, when it beat Mt. Ararat for the title.

Wednesday night, the final shot hadn’t come to rest before Wagner was swarmed by teammates, who in turn were swarmed by classmates storming the field. They lifted Wagner onto their shoulders and carried him back to the bench.

“I just had the time and the space so I took a shot,” Wagner said. “It was the best feeling ever. The crowd afterward, that was just crazy.”

Scarborough (15-1-1) entered as the No. 1 seed.

“That’s the kind of goal you want a game to end on. It’s a high school player’s dream,” Cheverus Coach Colin Minte said. “I can’t say enough about the fight in my kids.”

Scarborough played like two-time defending champions, carrying play much of the game, racking up sizable edges in shots (37-21), shots on goal (21-12) and corner kicks (6-2).

The Stags, however, had a distinct advantage in goalkeeper Jake Tomkinson (19 saves), whose play in the first overtime robbed the Red Storm of three goals.

“I just try to stay in position and do my job,” Tomkinson said. “Scarborough’s a great team and they put us under a lot of pressure, but our guys did everything they could to keep the ball from getting through.”

All four of the goals in regulation came off set pieces.

“Set pieces obviously did play a big role tonight,” Scarborough Coach Mark Diaz said. “Hats off to Cheverus, they played a great game. I told the boys we have nothing to be ashamed of. We’re young (18 juniors and sophomores) and to get this far undefeated is quite an accomplishment. We had our chances.”

Mackenzie Hoglund put Cheverus up 1-0 in the 27th minute, heading in Derek Hammond’s 35-yard free kick.

Sam Ware tied it from a scrum in the 58th minute, finishing off one of Matt Caron’s several 30-yard throw-ins. The Red Storm took a 2-1 lead off a free kick about nine minutes later, when Josh Morrissey gathered a loose ball at the top of the 18-yard box and hammered it in.

Conceding the tying and go-ahead goals in succession didn’t rattle Tomkinson.

“I told myself we were still in it,” he said. “We were definitely still in it.”

Andrei Vile proved Tomkinson right when he knocked in a loose ball during a scramble to make it 2-2 with 2:05 remaining in regulation.

The play started on another Hammond free kick from 25 yards.

Tomkinson held on to force the second OT and set up Wagner’s heroics.

“As the seventh seed, no one saw us coming,” Minte said. “But here we are. These kids just keep fighting. They just don’t want to lose.”